Main MRPT website > C++ reference for MRPT 1.5.6
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)
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< int > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
bool BASE_IMPEXP mrpt::system::vectorToTextFile (const std::vector< size_t > &vec, const std::string &fileName, bool append=false, bool byRows=false)
 
template<class EIGEN_MATRIX >
bool mrpt::system::vectorToTextFile (const EIGEN_MATRIX &vec, const std::string &fileName)
 
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

bool 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

Definition at line 98 of file vector_loadsave.cpp.

References mrpt::utils::CFileInputStream::getTotalBytesCount(), and mrpt::utils::CStream::ReadBuffer().

bool 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

Definition at line 78 of file vector_loadsave.cpp.

References mrpt::system::os::fopen().

bool 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

Definition at line 119 of file vector_loadsave.cpp.

References mrpt::utils::CStream::WriteBuffer().

Referenced by mrpt::compress::zip::decompress_gz_data_block(), and mrpt::opengl::C3DSScene::loadFrom3DSFile().

bool 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.

Definition at line 22 of file vector_loadsave.cpp.

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

Referenced by mrpt::bayes::CKalmanFilterCapable< VEH_SIZE, OBS_SIZE, FEAT_SIZE, ACT_SIZE, KFTYPE >::runOneKalmanIteration().

bool 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.

Definition at line 36 of file vector_loadsave.cpp.

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

bool 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.

Definition at line 50 of file vector_loadsave.cpp.

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

bool 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.

Definition at line 64 of file vector_loadsave.cpp.

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

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.




Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018