- if (is_a<print_tree>(c)) {
-
- inherited::print(c, level);
-
- } else {
-
- if (is_a<print_python_repr>(c))
- c.s << class_name() << '(';
-
- if (is_a<print_latex>(c))
- c.s << "\\left(\\begin{array}{" << std::string(col,'c') << "}";
- else
- c.s << "[";
-
- for (unsigned ro=0; ro<row; ++ro) {
- if (!is_a<print_latex>(c))
- c.s << "[";
- for (unsigned co=0; co<col; ++co) {
- m[ro*col+co].print(c);
- if (co<col-1) {
- if (is_a<print_latex>(c))
- c.s << "&";
- else
- c.s << ",";
- } else {
- if (!is_a<print_latex>(c))
- c.s << "]";
- }
- }
- if (ro<row-1) {
- if (is_a<print_latex>(c))
- c.s << "\\\\";
- else
- c.s << ",";
- }