Custom I/O for math containers¶
// global functions template <class TRIPLET> bool mrpt::math::saveEigenSparseTripletsToFile( const std::string& sFile, std::vector<TRIPLET>& tri );
Global 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.
Output format is one line per entry with the format: “i j val”, i:row, j:col, val:value.
Parameters:
TRIPLET |
should be Eigen::Triplet<T> |