Registered Member
|
Hi developers,
please include something similar to the following lines into one of Eigen's header file. Please think about students learning C++ ! Many thanks, Helmut. namespace Eigen { template std::istream & operator >>(std::istream & Inp, MatrixBase & m) { for (int i = 0; i > m(i,j); return Inp; } } |
Registered Member
|
Hm, OK, if it makes it easier to teach Eigen, that's already something. I'm not opposed to that... (not enthusiastic either as this would probably never get used outside of teaching).
For output, we support formats, which makes it generally useful. In order to make input generally useful too, we would also need formats. So I wonder, before including that, if it should be included in that form, or if we want tokenization (strtok and whatever the c++ equivalent is).
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
If output differs only in the amount of whitespace that's no problem. For more sophisticated input one can read into an istringstream and process it. For most uses, white space separated input suffices. Helmut. |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell