alpaqa sparse
Nonconvex constrained optimization
Loading...
Searching...
No Matches
print.cpp
Go to the documentation of this file.
1#include <alpaqa/export.h>
3
4namespace alpaqa {
5
6using Eigen::MatrixX;
7using Eigen::VectorX;
8using std::complex;
9using std::ostream;
10
11#ifndef DOXYGEN
12// clang-format off
13
14template ALPAQA_EXPORT std::string float_to_str(float value, int precision);
15template ALPAQA_EXPORT std::string float_to_str(double value, int precision);
16template ALPAQA_EXPORT std::string float_to_str(long double value, int precision);
17
18namespace detail {
19template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<int>> &, std::string_view, std::string_view, std::string_view);
20template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<Eigen::Index>> &, std::string_view, std::string_view, std::string_view);
21template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<float>> &, std::string_view, std::string_view, std::string_view);
22template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<double>> &, std::string_view, std::string_view, std::string_view);
23template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<long double>> &, std::string_view, std::string_view, std::string_view);
24template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<float>>> &, std::string_view, std::string_view, std::string_view);
25template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<double>>> &, std::string_view, std::string_view, std::string_view);
26template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<long double>>> &, std::string_view, std::string_view, std::string_view);
27
28template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<int>> &, std::string_view);
29template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<Eigen::Index>> &, std::string_view);
30template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<float>> &, std::string_view);
31template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<double>> &, std::string_view);
32template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<long double>> &, std::string_view);
33template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<float>>> &, std::string_view);
34template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<double>>> &, std::string_view);
35template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<long double>>> &, std::string_view);
36
37template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<int>> &, std::string_view);
38template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<Eigen::Index>> &, std::string_view);
39template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<float>> &, std::string_view);
40template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<double>> &, std::string_view);
41template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<long double>> &, std::string_view);
42template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<float>>> &, std::string_view);
43template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<double>>> &, std::string_view);
44template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<long double>>> &, std::string_view);
45}
46
47#ifdef ALPAQA_WITH_QUAD_PRECISION
48template ALPAQA_EXPORT std::string float_to_str(__float128 value, int precision);
49
50namespace detail {
51template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<__float128>> &, std::string_view, std::string_view, std::string_view);
52template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<__float128>>> &, std::string_view, std::string_view, std::string_view);
53
54template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<__float128>> &, std::string_view);
55template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<__float128>>> &, std::string_view);
56
57template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<__float128>> &, std::string_view);
58template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<__float128>>> &, std::string_view);
59}
60#endif
61
62// clang-format on
63#endif // DOXYGEN
64
65} // namespace alpaqa
std::ostream & print_matlab_impl(std::ostream &os, const T &M, std::string_view end)
Definition print.tpp:117
std::ostream & print_python_impl(std::ostream &os, const T &M, std::string_view end)
Definition print.tpp:138
std::ostream & print_csv_impl(std::ostream &os, const T &M, std::string_view sep, std::string_view begin, std::string_view end)
Definition print.tpp:91
constexpr const auto inf
Definition config.hpp:85
std::string float_to_str(F value, int precision)
Definition print.tpp:67