Reference implementation of dense tensor class in terms of STL's vector