Main MRPT website > C++ reference for MRPT 1.4.0
Functions
Load and save vectors to files (in #include <mrpt/system/vector_loadsave.h>)

Detailed Description

Collaboration diagram for Load and save vectors to files (in #include <mrpt/system/vector_loadsave.h>):

Functions

bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< float > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 A useful function for debugging, which saves a std::vector into a text file (compat. More...
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< double > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< int > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< size_t > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<class EIGEN_MATRIX >
bool mrpt::system::vectorToTextFile (const EIGEN_MATRIX &vec, const std::string &fileName)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
bool BASE_IMPEXP mrpt::system::vectorFromTextFile (std::vector< double > &vec, const std::string &fileName, const bool byRows=false)
 Load a std::vector from a text file (compat. More...
 
bool BASE_IMPEXP mrpt::system::vectorToBinaryFile (const vector_byte &vec, const std::string &fileName)
 Saves a vector directly as a binary dump to a file: More...
 
bool BASE_IMPEXP mrpt::system::loadBinaryFile (vector_byte &out_data, const std::string &fileName)
 Loads a entire file as a vector of bytes. More...
 

Function Documentation

◆ loadBinaryFile()

bool BASE_IMPEXP mrpt::system::loadBinaryFile ( vector_byte out_data,
const std::string &  fileName 
)

Loads a entire file as a vector of bytes.

Returns
Returns false on any error, true on everything OK.
See also
vectorToBinaryFile

◆ vectorFromTextFile()

bool BASE_IMPEXP mrpt::system::vectorFromTextFile ( std::vector< double > &  vec,
const std::string &  fileName,
const bool  byRows = false 
)

Load a std::vector from a text file (compat.

with MATLAB)

Returns
Returns false on any error, true on everything OK.
See also
loadBinaryFile

◆ vectorToBinaryFile()

bool BASE_IMPEXP mrpt::system::vectorToBinaryFile ( const vector_byte vec,
const std::string &  fileName 
)

Saves a vector directly as a binary dump to a file:

Returns
Returns false on any error, true on everything OK.
See also
loadBinaryFile

◆ vectorToTextFile() [1/5]

template<class EIGEN_MATRIX >
bool mrpt::system::vectorToTextFile ( const EIGEN_MATRIX &  vec,
const std::string &  fileName 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 33 of file vector_loadsave.h.

◆ vectorToTextFile() [2/5]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< double > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [3/5]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< float > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

A useful function for debugging, which saves a std::vector into a text file (compat.

with MATLAB)

Returns
Returns false on any error, true on everything OK.

◆ vectorToTextFile() [4/5]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< int > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ vectorToTextFile() [5/5]

bool BASE_IMPEXP mrpt::system::vectorToTextFile ( const std::vector< size_t > &  vec,
const std::string &  fileName,
bool  append = false,
bool  byRows = false 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.




Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Sun Mar 7 18:43:46 UTC 2021