alpaqa 1.0.0a15
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<long>> &, std::string_view, std::string_view, std::string_view);
21template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<long long>> &, std::string_view, std::string_view, std::string_view);
22template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<float>> &, std::string_view, std::string_view, std::string_view);
23template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<double>> &, std::string_view, std::string_view, std::string_view);
24template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<long double>> &, std::string_view, std::string_view, std::string_view);
25template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<float>>> &, std::string_view, std::string_view, std::string_view);
26template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<double>>> &, std::string_view, std::string_view, std::string_view);
27template 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);
28
29template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<int>> &, std::string_view);
30template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<long>> &, std::string_view);
31template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<long long>> &, std::string_view);
32template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<float>> &, std::string_view);
33template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<double>> &, std::string_view);
34template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<long double>> &, std::string_view);
35template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<float>>> &, std::string_view);
36template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<double>>> &, std::string_view);
37template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<long double>>> &, std::string_view);
38
39template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<int>> &, std::string_view);
40template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<long>> &, std::string_view);
41template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<long long>> &, std::string_view);
42template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<float>> &, std::string_view);
43template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<double>> &, std::string_view);
44template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<long double>> &, std::string_view);
45template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<float>>> &, std::string_view);
46template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<double>>> &, std::string_view);
47template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<long double>>> &, std::string_view);
48}
49
50#ifdef ALPAQA_WITH_QUAD_PRECISION
51template ALPAQA_EXPORT std::string float_to_str(__float128 value, int precision);
52
53namespace detail {
54template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<__float128>> &, std::string_view, std::string_view, std::string_view);
55template ALPAQA_EXPORT ostream &print_csv_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<__float128>>> &, std::string_view, std::string_view, std::string_view);
56
57template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<__float128>> &, std::string_view);
58template ALPAQA_EXPORT ostream &print_matlab_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<__float128>>> &, std::string_view);
59
60template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<__float128>> &, std::string_view);
61template ALPAQA_EXPORT ostream &print_python_impl(ostream &os, const Eigen::Ref<const MatrixX<complex<__float128>>> &, std::string_view);
62}
63#endif
64
65// clang-format on
66#endif // DOXYGEN
67
68} // 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