27 const std::vector<float>& vec,
const std::string& fileName,
28 bool append =
false,
bool byRows =
false);
31 const std::vector<double>& vec,
const std::string& fileName,
32 bool append =
false,
bool byRows =
false);
35 const std::vector<int>& vec,
const std::string& fileName,
36 bool append =
false,
bool byRows =
false);
39 const std::vector<size_t>& vec,
const std::string& fileName,
40 bool append =
false,
bool byRows =
false);
42 template <
class EIGEN_MATRIX>
47 vec.saveToTextFile(fileName);
61 std::vector<double>& vec,
const std::string& fileName,
62 const bool byRows =
false);
std::vector< uint8_t > vector_byte
bool vectorToBinaryFile(const vector_byte &vec, const std::string &fileName)
Saves a vector directly as a binary dump to a file:
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool vectorFromTextFile(std::vector< double > &vec, const std::string &fileName, const bool byRows=false)
Load a std::vector from a text file (compat.
bool 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.
bool loadBinaryFile(vector_byte &out_data, const std::string &fileName)
Loads a entire file as a vector of bytes.