[eigen] An input operator, please (this years' petition)

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

I petition this (only) once per year.

Please add an input operator to Eigen.

My current simple solutions would be sufficient:

add to Eigen/src/Core/IO.h

+template<typename Derived>
+std::istream & operator >>
+(std::istream & s,
+ MatrixBase<Derived> & m)
+{
+    for (int i = 0; i < m.rows(); ++i)
+    for (int j = 0; j < m.cols(); j++)
+      s >> m(i,j);
+
+  return s;
+}


Thanks for considering this, so that my student don't need to use my patched Eigen.

Helmut.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/