MIRA
Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
TEigenFormat< Derived > Class Template Reference

Template class wrapping the serializing functionality of eigen to support stream operators using a given format. More...

#include <math/EigenFormat.h>

Inheritance diagram for TEigenFormat< Derived >:
Inheritance graph
[legend]

Public Member Functions

 TEigenFormat (Eigen::MatrixBase< Derived > &matrix, Eigen::IOFormat format)
 

Static Public Member Functions

static std::string getToken (std::istream &is, std::size_t maxlength=255, char keepwhitespace=0)
 
static void putback (std::istream &is, int num)
 
static int match (std::istream &is, const std::string str1, const std::string str2)
 
static void match (std::istream &is, const std::string str)
 
static Eigen::IOFormat matlab (int precision=4)
 
static Eigen::IOFormat clean (int precision=4)
 
static Eigen::IOFormat eigen (int precision=-1)
 
static Eigen::IOFormat python (int precision=4)
 

Protected Attributes

Eigen::MatrixBase< Derived > & mMatrix
 The matrix that gets formatted. More...
 
Eigen::IOFormat mFormat
 

Friends

std::istream & operator>> (std::istream &is, TEigenFormat< Derived > format)
 Input stream operator for reading a matrix from stream in a given format. More...
 

Detailed Description

template<typename Derived>
class mira::TEigenFormat< Derived >

Template class wrapping the serializing functionality of eigen to support stream operators using a given format.

This variant supports reading and writing, hence the >>operator is available.

Constructor & Destructor Documentation

◆ TEigenFormat()

TEigenFormat ( Eigen::MatrixBase< Derived > &  matrix,
Eigen::IOFormat  format 
)
inline

Member Function Documentation

◆ getToken()

static std::string getToken ( std::istream &  is,
std::size_t  maxlength = 255,
char  keepwhitespace = 0 
)
inlinestatic

◆ putback()

static void putback ( std::istream &  is,
int  num 
)
inlinestatic

◆ match() [1/2]

static int match ( std::istream &  is,
const std::string  str1,
const std::string  str2 
)
inlinestatic

◆ match() [2/2]

static void match ( std::istream &  is,
const std::string  str 
)
inlinestatic

◆ matlab()

static Eigen::IOFormat matlab ( int  precision = 4)
inlinestaticinherited

◆ clean()

static Eigen::IOFormat clean ( int  precision = 4)
inlinestaticinherited

◆ eigen()

static Eigen::IOFormat eigen ( int  precision = -1)
inlinestaticinherited

◆ python()

static Eigen::IOFormat python ( int  precision = 4)
inlinestaticinherited

Friends And Related Function Documentation

◆ operator>>

std::istream& operator>> ( std::istream &  is,
TEigenFormat< Derived >  format 
)
friend

Input stream operator for reading a matrix from stream in a given format.

Parameters
isThe input stream
formatThe format class
Returns
The stream

Member Data Documentation

◆ mMatrix

Eigen::MatrixBase<Derived>& mMatrix
protectedinherited

The matrix that gets formatted.

◆ mFormat

Eigen::IOFormat mFormat
protectedinherited

The documentation for this class was generated from the following file: