Template Function Karana::Math::dumpString

Template Function Karana::Math::dumpString#

Function Documentation#

template<typename Derived>
std::string Karana::Math::dumpString(const Eigen::MatrixBase<Derived> &mat, const std::string &prefix = "", unsigned int precision = 10, bool exponential = false)#

Return a pretty formatted string with values from the vector/matrix. A newline is not added at the end is added only for matrices and not for vectors.

Parameters:
  • mat – The matrix to get the formatted string for.

  • prefix – String prefix for each line.

  • precision – Number of digits to use for floating point values.

  • exponential – Use exponential notation if true.

Returns:

Formatted string for this matrix.