1 #include "math_matrixinset.h"
2 #include "math_parser.h"
3 #include "math_mathmlstream.h"
9 MathMatrixInset::MathMatrixInset(MathGridInset const & p)
14 auto_ptr<InsetBase> MathMatrixInset::clone() const
16 return auto_ptr<InsetBase>(new MathMatrixInset(*this));
20 void MathMatrixInset::write(WriteStream & os) const
22 MathGridInset::write(os);
26 void MathMatrixInset::normalize(NormalStream & os) const
28 MathGridInset::normalize(os);
32 void MathMatrixInset::maple(MapleStream & os) const
34 os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
35 for (idx_type idx = 0; idx < nargs(); ++idx) {
44 void MathMatrixInset::maxima(MaximaStream & os) const
47 for (row_type row = 0; row < nrows(); ++row) {
51 for (col_type col = 0; col < ncols(); ++col) {
54 os << cell(index(row, col));
62 void MathMatrixInset::mathmlize(MathMLStream & os) const
64 MathGridInset::mathmlize(os);
68 void MathMatrixInset::octave(OctaveStream & os) const
71 for (row_type row = 0; row < nrows(); ++row) {
75 for (col_type col = 0; col < ncols(); ++col)
76 os << cell(index(row, col)) << ' ';