2 #include "math_matrixinset.h"
3 #include "math_parser.h"
4 #include "math_mathmlstream.h"
8 MathMatrixInset::MathMatrixInset(MathGridInset const & p)
13 MathInset * MathMatrixInset::clone() const
15 return new MathMatrixInset(*this);
19 void MathMatrixInset::write(WriteStream & os) const
21 MathGridInset::write(os);
25 void MathMatrixInset::normalize(NormalStream & os) const
27 MathGridInset::normalize(os);
31 void MathMatrixInset::maple(MapleStream & os) const
33 os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
34 for (idx_type idx = 0; idx < nargs(); ++idx) {
43 void MathMatrixInset::maxima(MaximaStream & os) const
46 for (row_type row = 0; row < nrows(); ++row) {
50 for (col_type col = 0; col < ncols(); ++col) {
53 os << cell(index(row, col));
61 void MathMatrixInset::mathmlize(MathMLStream & os) const
63 MathGridInset::mathmlize(os);
67 void MathMatrixInset::octave(OctaveStream & os) const
70 for (row_type row = 0; row < nrows(); ++row) {
74 for (col_type col = 0; col < ncols(); ++col)
75 os << cell(index(row, col)) << ' ';