/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: Frank Dellaert, et al. (see THANKS for the full author list) * See LICENSE for the license information * -------------------------------------------------------------------------- */ /** * @file Tensor5.h * @brief Rank 5 tensors based on http://www.gps.caltech.edu/~walter/FTensor/FTensor.pdf * @date Feb 12, 2010 * @author Frank Dellaert */ #pragma once #include namespace tensors { /** * Rank 5 Tensor * @ingroup tensors * \nosubgrouping */ template class Tensor5 { private: Tensor4 T[N5]; ///< Storage public: /// @name Standard Constructors /// @{ /** default constructor */ Tensor5() { } /// @} /// @name Standard Interface /// @{ /** construct from expression */ template Tensor5(const Tensor5Expression , Index , Index , Index , Index >& a) { for (int m = 0; m < N5; m++) T[m] = a(m); } /// element access 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