This forum has been archived. All content is frozen. Please use KDE Discuss instead.

a plea for inclusion of a few lines of code

Tags: None
(comma "," separated)
HWJ
Registered Member
Posts
18
Karma
0
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;
}

}
User avatar
bjacob
Registered Member
Posts
658
Karma
3
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!
HWJ
Registered Member
Posts
18
Karma
0
bjacob wrote: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).


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.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell