You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
603 B

  1. std::string sep = "\n----------------------------------------\n";
  2. Matrix3d m1;
  3. m1 << 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9;
  4. IOFormat CommaInitFmt(StreamPrecision, DontAlignCols, ", ", ", ", "", "", " << ", ";");
  5. IOFormat CleanFmt(4, 0, ", ", "\n", "[", "]");
  6. IOFormat OctaveFmt(StreamPrecision, 0, ", ", ";\n", "", "", "[", "]");
  7. IOFormat HeavyFmt(FullPrecision, 0, ", ", ";\n", "[", "]", "[", "]");
  8. std::cout << m1 << sep;
  9. std::cout << m1.format(CommaInitFmt) << sep;
  10. std::cout << m1.format(CleanFmt) << sep;
  11. std::cout << m1.format(OctaveFmt) << sep;
  12. std::cout << m1.format(HeavyFmt) << sep;