MRPT  2.0.2
Functions
Custom I/O for math containers

Detailed Description

Collaboration diagram for Custom I/O for math containers:

Functions

template<class TRIPLET >
bool mrpt::math::saveEigenSparseTripletsToFile (const std::string &sFile, std::vector< TRIPLET > &tri)
 Saves to a plain-text file the nonzero entries of a Eigen sparse matrix, represented as a vector of triplets. More...
 

Function Documentation

◆ saveEigenSparseTripletsToFile()

template<class TRIPLET >
bool mrpt::math::saveEigenSparseTripletsToFile ( const std::string &  sFile,
std::vector< TRIPLET > &  tri 
)

Saves to a plain-text file the nonzero entries of a Eigen sparse matrix, represented as a vector of triplets.

Output format is one line per entry with the format: "i j val", i:row, j:col, val:value.

Template Parameters
TRIPLETshould be Eigen::Triplet<T>

Definition at line 234 of file math/include/mrpt/math/utils.h.

References mrpt::system::os::fclose(), mrpt::system::os::fopen(), and mrpt::system::os::fprintf().

Here is the call graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 2.0.2 Git: 9b4fd2465 Mon May 4 16:59:08 2020 +0200 at lun may 4 17:26:07 CEST 2020