Reimplemented the Tensor stream output.

This commit is contained in:
cpp977
2021-11-16 17:36:58 +00:00
committed by Rasmus Munk Larsen
parent 2b9297196c
commit f73c95c032
5 changed files with 498 additions and 166 deletions

View File

@@ -962,6 +962,11 @@ class TensorBase<Derived, ReadOnlyAccessors>
return TensorForcedEvalOp<const Derived>(derived());
}
// Returns a formatted tensor ready for printing to a stream
inline const TensorWithFormat<Derived,DerivedTraits::Layout,DerivedTraits::NumDimensions> format(const TensorIOFormat& fmt) const {
return TensorWithFormat<Derived,DerivedTraits::Layout,DerivedTraits::NumDimensions>(derived(), fmt);
}
#ifdef EIGEN_READONLY_TENSORBASE_PLUGIN
#include EIGEN_READONLY_TENSORBASE_PLUGIN
#endif