alpaqa 1.0.0a12
Nonconvex constrained optimization
Loading...
Searching...
No Matches
csv.hpp
Go to the documentation of this file.
1#pragma once
2
4#include <alpaqa/export.h>
5#include <iosfwd>
6#include <stdexcept>
7#include <vector>
8
9namespace alpaqa::csv {
10
11struct ALPAQA_EXPORT read_error : std::runtime_error {
12 using std::runtime_error::runtime_error;
13};
14
15template <std::floating_point F>
16void ALPAQA_EXPORT read_row_impl(std::istream &is,
17 Eigen::Ref<Eigen::VectorX<F>> v,
18 char sep = ',');
19
20template <std::floating_point F>
21std::vector<F> ALPAQA_EXPORT read_row_std_vector(std::istream &is,
22 char sep = ',');
23
24#define ALPAQA_READ_ROW_OVL(type) \
25 inline void read_row(std::istream &is, Eigen::Ref<Eigen::VectorX<type>> v, \
26 char sep) { \
27 return read_row_impl<type>(is, v, sep); \
28 } \
29 inline void read_row(std::istream &is, \
30 Eigen::Ref<Eigen::VectorX<type>> v) { \
31 return read_row_impl<type>(is, v); \
32 }
33
37#ifdef ALPAQA_WITH_QUAD_PRECISION
39#endif
40
41#undef ALPAQA_READ_ROW_OVL
42
43} // namespace alpaqa::csv
#define ALPAQA_READ_ROW_OVL(type)
Definition csv.hpp:24
std::vector< F > read_row_std_vector(std::istream &is, char sep)
Definition csv.tpp:123
void read_row_impl(std::istream &is, Eigen::Ref< Eigen::VectorX< F > > v, char sep)
Definition csv.tpp:114
constexpr const auto inf
Definition config.hpp:85