5 #include "math_matrixinset.h"
6 #include "math_parser.h"
7 #include "math_mathmlstream.h"
11 MathMatrixInset::MathMatrixInset(MathGridInset const & p)
16 MathInset * MathMatrixInset::clone() const
18 return new MathMatrixInset(*this);
22 void MathMatrixInset::write(WriteStream & os) const
24 MathGridInset::write(os);
28 void MathMatrixInset::normalize(NormalStream & os) const
30 MathGridInset::normalize(os);
34 void MathMatrixInset::maplize(MapleStream & os) const
36 os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
37 for (idx_type idx = 0; idx < nargs(); ++idx) {
46 void MathMatrixInset::maximize(MaximaStream & os) const
49 for (row_type row = 0; row < nrows(); ++row) {
53 for (col_type col = 0; col < ncols(); ++col) {
56 os << cell(index(row, col));
64 void MathMatrixInset::mathmlize(MathMLStream & os) const
66 MathGridInset::mathmlize(os);
70 void MathMatrixInset::octavize(OctaveStream & os) const
73 for (row_type row = 0; row < nrows(); ++row) {
77 for (col_type col = 0; col < ncols(); ++col)
78 os << cell(index(row, col)) << ' ';