|
Medusa
1.1
Coordinate Free Mehless Method implementation
|
|
Go to the documentation of this file. 1 #ifndef MEDUSA_BITS_IO_CSV_FWD_HPP_
2 #define MEDUSA_BITS_IO_CSV_FWD_HPP_
17 template <
typename Derived>
20 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
43 static std::vector<double>
read(
const std::string& filename);
51 static std::vector<std::vector<double>>
read2d(
const std::string& filename,
52 char separator =
',');
62 const std::string& filename,
char separator =
',');
70 template <
typename arr_t>
71 static void write(
const std::string& filename,
const arr_t& array);
81 template <
typename arr_t>
82 static void write2d(
const std::string& filename,
const arr_t& array,
char separator =
',');
92 template <
typename Derived>
93 static void writeEigen(
const std::string& filename,
const Eigen::MatrixBase<Derived>& expr,
94 char separator =
',');
104 static std::vector<std::string>
split(
const std::string&
str,
char separator);
108 #endif // MEDUSA_BITS_IO_CSV_FWD_HPP_
Root namespace for the whole library.
static void writeEigen(const std::string &filename, const Eigen::MatrixBase< Derived > &expr, char separator=',')
Writes given Eigen matrix to a CSV file.
std::string str(shape_flags f)
Convert shape flags to a string representation.
static std::vector< std::vector< double > > read2d(const std::string &filename, char separator=',')
Reads a CSV file to a vector of vectors of doubles.
Implements support for basic CSV I/O.
static Eigen::Matrix< double, -1, -1, 0, -1, -1 > readEigen(const std::string &filename, char separator=',')
Reads a CSV file to an Eigen matrix.
static void write(const std::string &filename, const arr_t &array)
Writes given array to a CSV file (as a column).
static std::vector< std::string > split(const std::string &str, char separator)
Splits given string into a vector of strings on the given separator.
Matrix(const Scalar &s)
Construct matrix from scalar. Enabled only for fixed size matrices.
static void write2d(const std::string &filename, const arr_t &array, char separator=',')
Writes given 2d array to a CSV file.
static std::vector< double > read(const std::string &filename)
Reads a CSV file to a vector of doubles.