Registered Member
|
Hi,
I have a small problem with printing of MatrixXd and VectorXd objects via std::cout: I can't change the precision of the elements. Even after the statements:
a MatrixXd or VectorXd object is only printed with 4 digits. Switching to scientific format works fine... How do I get more digits? (BTW, this is on Mac OS X 10.6.1 using gcc 4.2.1 and eigen 2.0.9) Thanks, Markus |
Registered Member
|
Yeah, the 2.0 version is a bit stupid in that it doesn't honor cout.precision().
With 2.0, to change the precision you have to use a IOFormat, see the docs for that class, and see MatrixBase::format(). With the development branch, cout.precision() is honored by default.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]