26 toMatlab(
const Eigen::Ref<const Eigen::MatrixXd> & M) : mat(M) {}
28 template<
typename Derived,
typename std::enable_if<!is_convertible_to_eigen_ref_v<Derived>,
int>::type = 0>
29 toMatlab(
const Eigen::EigenBase<Derived> & M) : tmp(M), mat(tmp)
35 const Eigen::Ref<const Eigen::MatrixXd> mat;
42 if(tom.mat.cols() == 1)
44 Eigen::IOFormat fmt(Eigen::StreamPrecision, 0,
"; ",
";",
"",
"",
"[",
"]");
45 o << tom.mat.transpose().format(fmt);
49 Eigen::IOFormat fmt(Eigen::StreamPrecision, 0,
", ",
";\n",
"",
"",
"[",
"]");
50 o << tom.mat.format(fmt);
Definition: toMatlab.h:24
friend std::ostream & operator<<(std::ostream &, const toMatlab &)
Definition: toMatlab.h:40
toMatlab(const Eigen::EigenBase< Derived > &M)
Definition: toMatlab.h:29
toMatlab(const Eigen::Ref< const Eigen::MatrixXd > &M)
Definition: toMatlab.h:26
std::ostream & operator<<(std::ostream &o, const toMatlab &tom)
Definition: toMatlab.h:40
constexpr bool is_convertible_to_eigen_ref_v
Definition: toMatlab.h:13