NEML2 2.0.0
Loading...
Searching...
No Matches
CSVReader Class Reference

An interface class for reading CSV files. More...

Detailed Description

An interface class for reading CSV files.

#include <CSVReader.h>

Inheritance diagram for CSVReader:

Public Member Functions

 CSVReader (const NEML2Object *obj)
 

Static Public Member Functions

static OptionSet expected_options ()
 

Protected Member Functions

csv::CSVFormat parse_format () const
 Helper function to parse CSV format.
 
std::vector< unsigned int > parse_indices (const csv::CSVReader &csv) const
 Helper function to parse column indices.
 
void read_all (csv::CSVReader &csv, std::vector< double > &vals, std::size_t &nrow, std::size_t &ncol) const
 Read all values without column indices.
 
void read_by_indices (csv::CSVReader &csv, const std::vector< unsigned int > &indices, std::vector< double > &vals, std::size_t &nrow, std::size_t &ncol) const
 Read values by specified column indices.
 

Constructor & Destructor Documentation

◆ CSVReader()

CSVReader ( const NEML2Object * obj)

Member Function Documentation

◆ expected_options()

static OptionSet expected_options ( )
static

◆ parse_format()

csv::CSVFormat parse_format ( ) const
protected

Helper function to parse CSV format.

◆ parse_indices()

std::vector< unsigned int > parse_indices ( const csv::CSVReader & csv) const
protected

Helper function to parse column indices.

◆ read_all()

void read_all ( csv::CSVReader & csv,
std::vector< double > & vals,
std::size_t & nrow,
std::size_t & ncol ) const
protected

Read all values without column indices.

◆ read_by_indices()

void read_by_indices ( csv::CSVReader & csv,
const std::vector< unsigned int > & indices,
std::vector< double > & vals,
std::size_t & nrow,
std::size_t & ncol ) const
protected

Read values by specified column indices.