2008-08-24 03:32:13 +08:00
|
|
|
std::string sep = "\n----------------------------------------\n";
|
2009-08-15 08:23:13 +08:00
|
|
|
Matrix3d m1;
|
2008-08-24 03:41:00 +08:00
|
|
|
m1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9;
|
2008-08-24 03:32:13 +08:00
|
|
|
|
2009-08-15 08:23:13 +08:00
|
|
|
IOFormat CommaInitFmt(StreamPrecision, DontAlignCols, ", ", ", ", "", "", " << ", ";");
|
|
|
|
IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]");
|
|
|
|
IOFormat OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]");
|
|
|
|
IOFormat HeavyFmt(FullPrecision, 0, ", ", ";\n", "[", "]", "[", "]");
|
2008-08-24 03:32:13 +08:00
|
|
|
|
|
|
|
std::cout << m1 << sep;
|
|
|
|
std::cout << m1.format(CommaInitFmt) << sep;
|
|
|
|
std::cout << m1.format(CleanFmt) << sep;
|
|
|
|
std::cout << m1.format(OctaveFmt) << sep;
|
|
|
|
std::cout << m1.format(HeavyFmt) << sep;
|