/* * Tensor5.h * @brief Rank 5 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf * Created on: Feb 12, 2010 * @author: Frank Dellaert */ #pragma once #include "tensors.h" namespace tensors { /** Rank 3 Tensor */ template class Tensor5 { private: Tensor4 T[N5]; public: /** default constructor */ Tensor5() { } /** construct from expression */ template Tensor5(const Tensor5Expression , Index , Index , Index , Index >& a) { for (int m = 0; m < N5; m++) T[m] = a(m); } double operator()(int i, int j, int k, int l, int m) const { return T[m](i, j, k, l); } /** convert to expression */ template Tensor5Expression , Index , Index , Index , Index > operator()(Index i, Index j, Index k, Index l, Index m) { return Tensor5Expression , Index , Index , Index , Index > (*this); } }; // Tensor5 } // namespace tensors