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, std::string_view prefix = "", unsigned int precision = 10, DumpFormatType format_type = DumpFormatType::DEFAULT_FLOAT, bool show_size = true)#

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.

  • format_type – The format type to use.

  • show_size – If true, the size of the array is shown.

Returns:

Formatted string for this matrix.