source: pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/eigen/doc/snippets/IOFormat.cpp

Last change on this file was 136, checked in by ldecherf, 8 years ago

Doc

File size: 603 bytes
Line 
1std::string sep = "\n----------------------------------------\n";
2Matrix3d m1;
3m1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9;
4
5IOFormat CommaInitFmt(StreamPrecision, DontAlignCols, ", ", ", ", "", "", " << ", ";");
6IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]");
7IOFormat OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]");
8IOFormat HeavyFmt(FullPrecision, 0, ", ", ";\n", "[", "]", "[", "]");
9
10std::cout << m1 << sep;
11std::cout << m1.format(CommaInitFmt) << sep;
12std::cout << m1.format(CleanFmt) << sep;
13std::cout << m1.format(OctaveFmt) << sep;
14std::cout << m1.format(HeavyFmt) << sep;
Note: See TracBrowser for help on using the repository browser.