Nonconvex constrained optimization
Loading...
Searching...
No Matches
print.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4#include <guanaqo/eigen/view.hpp>
5#include <guanaqo/print.hpp>
6
7namespace alpaqa {
8
9using guanaqo::float_to_str;
10using guanaqo::float_to_str_vw;
11
12template <class Derived>
13std::ostream &print_python(std::ostream &os,
14 const Eigen::DenseBase<Derived> &M) {
15 if constexpr (requires { M.derived().data(); })
16 return guanaqo::print_python(os, guanaqo::as_view(M));
17 else
18 return print_python(os, M.eval());
19}
20
21} // namespace alpaqa
std::ostream & print_python(std::ostream &os, const Eigen::DenseBase< Derived > &M)
Definition print.hpp:13