16template <std::
floating_po
int F>
25 std::string_view begin =
"", std::string_view end =
"\n");
29 std::string_view end =
";\n");
33 std::string_view end =
"\n");
35#define ALPAQA_PRINT_OVL_IMPL(name, type) \
36 template <class... Args> \
37 std::ostream &print_##name##_helper( \
38 std::ostream &os, const Eigen::Ref<const Eigen::MatrixX<type>> &M, \
40 return print_##name##_impl(os, M, std::forward<Args>(args)...); \
42#define ALPAQA_PRINT_OVL(type) \
43 ALPAQA_PRINT_OVL_IMPL(csv, type) \
44 ALPAQA_PRINT_OVL_IMPL(matlab, type) \
45 ALPAQA_PRINT_OVL_IMPL(python, type)
50#ifdef ALPAQA_WITH_QUAD_PRECISION
56#define ALPAQA_PRINT_CVT(name) \
57 template <class Derived, class... Args> \
58 std::ostream &print_##name(std::ostream &os, \
59 const Eigen::DenseBase<Derived> &M, \
61 using R = Eigen::Ref<const Eigen::MatrixX<typename Derived::Scalar>>; \
62 return detail::print_##name##_helper(os, static_cast<const R &>(M), \
63 std::forward<Args>(args)...); \
70#undef ALPAQA_PRINT_CVT
71#undef ALPAQA_PRINT_OVL
72#undef ALPAQA_PRINT_OVL_IMPL
std::ostream & print_matlab_impl(std::ostream &os, const T &M, std::string_view end)
std::ostream & print_python_impl(std::ostream &os, const T &M, std::string_view end)
std::ostream & print_csv_impl(std::ostream &os, const T &M, std::string_view sep, std::string_view begin, std::string_view end)
std::string float_to_str(F value, int precision)
#define ALPAQA_PRINT_OVL(type)
#define ALPAQA_PRINT_CVT(name)