|
cgv
|
csv reader for parsing matrices of a homogenous number type More...
#include <csv_reader.h>
Public Member Functions | |
| csv_matrix_reader (const std::string &file_name, CSV_Flags _flags=CSV_SPACE) | |
| construct from csv file with flags defaulting to use of space as separator | |
| template<typename T > | |
| bool | parse_matrix (std::vector< std::vector< T > > &matrix, T init=T(0)) |
| parse matrix into nested vector struct and initialize entries to given init value (only rectangular matrices supported) | |
| template<typename T , unsigned N> | |
| bool | parse_matrix (std::vector< cgv::math::fvec< T, N > > &matrix, T init=T(0)) |
| parse matrix into nested vector struct and initialize entries to given init value (only rectangular matrices supported) | |
Public Member Functions inherited from cgv::utils::csv_reader_base | |
| bool | fail () const |
Additional Inherited Members | |
Protected Member Functions inherited from cgv::utils::csv_reader_base | |
| const char * | get_ws () const |
| const char * | get_sep () const |
| bool | has_heading () const |
| bool | find_column_index (const std::string &col_name, size_t &col_index) const |
| csv_reader_base (const std::string &file_name, CSV_Flags _flags=CSV_DEFAULT) | |
| bool | parse_next_line (std::vector< cgv::utils::token > &tokens) const |
Protected Attributes inherited from cgv::utils::csv_reader_base | |
| std::string | last_error |
| bool | failed = false |
| size_t | li = 0 |
| size_t | nr_cols = 0 |
| CSV_Flags | flags |
| std::string | content |
| std::vector< std::string > | col_names |
| std::vector< cgv::utils::line > | lines |
csv reader for parsing matrices of a homogenous number type
Definition at line 50 of file csv_reader.h.
|
inline |
construct from csv file with flags defaulting to use of space as separator
Definition at line 54 of file csv_reader.h.
|
inline |
parse matrix into nested vector struct and initialize entries to given init value (only rectangular matrices supported)
Definition at line 69 of file csv_reader.h.
References cgv::utils::from_string(), and cgv::utils::to_string().
|
inline |
parse matrix into nested vector struct and initialize entries to given init value (only rectangular matrices supported)
Definition at line 57 of file csv_reader.h.
References cgv::utils::from_string(), and cgv::utils::to_string().