v2.0.0
Loading...
Searching...
No Matches
UTILSLIB::IOUtils Class Reference

Eigen matrix I/O utilities. More...

#include <ioutils.h>

Public Types

typedef QSharedPointer< IOUtils > SPtr
typedef QSharedPointer< const IOUtils > ConstSPtr

Public Member Functions

 ~IOUtils ()

Static Public Member Functions

template<typename T>
static bool write_eigen_matrix (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &in, const QString &sPath, const QString &sDescription=QString())
template<typename T>
static bool write_eigen_matrix (const Eigen::Matrix< T, 1, Eigen::Dynamic > &in, const QString &sPath, const QString &sDescription=QString())
template<typename T>
static bool write_eigen_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &in, const QString &sPath, const QString &sDescription=QString())
template<typename T>
static bool write_eigen_matrix (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &in, const std::string &sPath, const std::string &sDescription=std::string())
template<typename T>
static bool write_eigen_matrix (const Eigen::Matrix< T, 1, Eigen::Dynamic > &in, const std::string &sPath, const std::string &sDescription=std::string())
template<typename T>
static bool write_eigen_matrix (const Eigen::Matrix< T, Eigen::Dynamic, 1 > &in, const std::string &sPath, const std::string &sDescription=std::string())
template<typename T>
static bool read_eigen_matrix (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &out, const QString &path)
template<typename T>
static bool read_eigen_matrix (Eigen::Matrix< T, 1, Eigen::Dynamic > &out, const QString &path)
template<typename T>
static bool read_eigen_matrix (Eigen::Matrix< T, Eigen::Dynamic, 1 > &out, const QString &path)
template<typename T>
static bool read_eigen_matrix (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &out, const std::string &path)
template<typename T>
static bool read_eigen_matrix (Eigen::Matrix< T, 1, Eigen::Dynamic > &out, const std::string &path)
template<typename T>
static bool read_eigen_matrix (Eigen::Matrix< T, Eigen::Dynamic, 1 > &out, const std::string &path)

Detailed Description

Eigen matrix I/O utilities.

IO utility routines for reading/writing Eigen matrices to text files.

Definition at line 80 of file ioutils.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const IOUtils> UTILSLIB::IOUtils::ConstSPtr

Const shared pointer type for IOUtils class.

Definition at line 84 of file ioutils.h.

◆ SPtr

typedef QSharedPointer<IOUtils> UTILSLIB::IOUtils::SPtr

Shared pointer type for IOUtils class.

Definition at line 83 of file ioutils.h.

Constructor & Destructor Documentation

◆ ~IOUtils()

UTILSLIB::IOUtils::~IOUtils ( )
inline

Definition at line 86 of file ioutils.h.

Member Function Documentation

◆ read_eigen_matrix() [1/6]

template<typename T>
bool UTILSLIB::IOUtils::read_eigen_matrix ( Eigen::Matrix< T, 1, Eigen::Dynamic > & out,
const QString & path )
static

Definition at line 253 of file ioutils.h.

◆ read_eigen_matrix() [2/6]

template<typename T>
bool UTILSLIB::IOUtils::read_eigen_matrix ( Eigen::Matrix< T, 1, Eigen::Dynamic > & out,
const std::string & path )
static

Definition at line 330 of file ioutils.h.

◆ read_eigen_matrix() [3/6]

template<typename T>
bool UTILSLIB::IOUtils::read_eigen_matrix ( Eigen::Matrix< T, Eigen::Dynamic, 1 > & out,
const QString & path )
static

Definition at line 268 of file ioutils.h.

◆ read_eigen_matrix() [4/6]

template<typename T>
bool UTILSLIB::IOUtils::read_eigen_matrix ( Eigen::Matrix< T, Eigen::Dynamic, 1 > & out,
const std::string & path )
static

Definition at line 345 of file ioutils.h.

◆ read_eigen_matrix() [5/6]

template<typename T>
bool UTILSLIB::IOUtils::read_eigen_matrix ( Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & out,
const QString & path )
static

Read Eigen Matrix from file (QString path).

Parameters
[out]outMatrix resized and filled with the values read; lines containing '#' are skipped.
[in]pathPath of the whitespace-separated text file to read.
Returns
True on success, false if the file could not be opened.

Definition at line 283 of file ioutils.h.

◆ read_eigen_matrix() [6/6]

template<typename T>
bool UTILSLIB::IOUtils::read_eigen_matrix ( Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & out,
const std::string & path )
static

Read Eigen Matrix from file (std::string path).

Parameters
[out]outMatrix resized and filled with the values read; lines containing '#' are skipped.
[in]pathPath of the whitespace-separated text file to read.
Returns
True on success, false if the file could not be opened.

Definition at line 360 of file ioutils.h.

◆ write_eigen_matrix() [1/6]

template<typename T>
bool UTILSLIB::IOUtils::write_eigen_matrix ( const Eigen::Matrix< T, 1, Eigen::Dynamic > & in,
const QString & sPath,
const QString & sDescription = QString() )
static

Definition at line 160 of file ioutils.h.

◆ write_eigen_matrix() [2/6]

template<typename T>
bool UTILSLIB::IOUtils::write_eigen_matrix ( const Eigen::Matrix< T, 1, Eigen::Dynamic > & in,
const std::string & sPath,
const std::string & sDescription = std::string() )
static

Definition at line 208 of file ioutils.h.

◆ write_eigen_matrix() [3/6]

template<typename T>
bool UTILSLIB::IOUtils::write_eigen_matrix ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > & in,
const QString & sPath,
const QString & sDescription = QString() )
static

Definition at line 170 of file ioutils.h.

◆ write_eigen_matrix() [4/6]

template<typename T>
bool UTILSLIB::IOUtils::write_eigen_matrix ( const Eigen::Matrix< T, Eigen::Dynamic, 1 > & in,
const std::string & sPath,
const std::string & sDescription = std::string() )
static

Definition at line 218 of file ioutils.h.

◆ write_eigen_matrix() [5/6]

template<typename T>
bool UTILSLIB::IOUtils::write_eigen_matrix ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & in,
const QString & sPath,
const QString & sDescription = QString() )
static

Write Eigen Matrix to file (QString path).

Parameters
[in]inMatrix to write as whitespace-separated text, one row per line.
[in]sPathPath of the output file; an existing file is overwritten.
[in]sDescriptionOptional description; if non-empty, a dimensions and description header is written.
Returns
True on success, false if the file could not be opened for writing.

Definition at line 180 of file ioutils.h.

◆ write_eigen_matrix() [6/6]

template<typename T>
bool UTILSLIB::IOUtils::write_eigen_matrix ( const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & in,
const std::string & sPath,
const std::string & sDescription = std::string() )
static

Write Eigen Matrix to file (std::string path).

Parameters
[in]inMatrix to write as whitespace-separated text, one row per line.
[in]sPathPath of the output file; an existing file is overwritten.
[in]sDescriptionOptional description; if non-empty, a dimensions and description header is written.
Returns
True on success, false if the file could not be opened for writing.

Definition at line 228 of file ioutils.h.


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