/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/common/csv_reader.hh Source File#

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/common/csv_reader.hh Source File
DiFfRG
Discretization Framework for functional Renormalization Group flows
csv_reader.hh
Go to the documentation of this file.
1#pragma once
2
3// standard library
4#include <cstddef>
5#include <string>
6
7// DiFfRG
9
10namespace DiFfRG
11{
19 {
20 public:
28 CSVReader(std::string input_file, char separator = ',', bool has_header = false);
29
35 size_t n_rows() const;
36
42 size_t n_cols() const;
43
51 double value(const std::string &col, const size_t row) const;
52
60 double value(const size_t col, const size_t row) const;
61
62 private:
63 std::string input_file;
65 };
66} // namespace DiFfRG
This class reads a .csv file and allows to access the data.
Definition csv_reader.hh:19
std::string input_file
Definition csv_reader.hh:63
double value(const size_t col, const size_t row) const
Get the stored value at a given row and column.
size_t n_cols() const
Get the number of columns in the .csv file.
double value(const std::string &col, const size_t row) const
Get the stored value at a given row and column.
size_t n_rows() const
Get the number of rows in the .csv file.
CSVReader(std::string input_file, char separator=',', bool has_header=false)
Construct a new External Data Interpolator object.
CsvTable table
Definition csv_reader.hh:64
Definition complex_math.hh:10
A numeric table, stored one vector per column.
Definition csv.hh:39