]> git.lyx.org Git - lyx.git/blob - src/mathed/math_matrixinset.C
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_matrixinset.C
1 #ifdef __GNUG__
2 #pragma implementation
3 #endif
4
5 #include "math_matrixinset.h"
6 #include "math_parser.h"
7 #include "math_mathmlstream.h"
8 #include "Lsstream.h"
9
10
11 MathMatrixInset::MathMatrixInset(MathArrayInset const & p)
12         : MathArrayInset(p)
13 {}
14
15
16 MathInset * MathMatrixInset::clone() const
17 {
18         return new MathMatrixInset(*this);
19 }
20
21
22 void MathMatrixInset::write(WriteStream & os) const
23 {
24         MathArrayInset::write(os);
25 }
26
27
28 void MathMatrixInset::normalize(NormalStream & os) const
29 {
30         MathArrayInset::normalize(os);
31 }
32
33
34 void MathMatrixInset::maplize(MapleStream & os) const
35 {
36         os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
37         for (idx_type idx = 0; idx < nargs(); ++idx) {
38                 if (idx)
39                         os << ',';
40                 os << cell(idx);
41         }
42         os << "])";
43 }
44
45
46 void MathMatrixInset::mathmlize(MathMLStream & os) const
47 {
48         MathGridInset::mathmlize(os);
49 }
50
51
52 void MathMatrixInset::octavize(OctaveStream & os) const
53 {
54         os << '[';
55         for (row_type row = 0; row < nrows(); ++row) {
56                 if (row)
57                         os << ';';
58                 os << '[';
59                 for (col_type col = 0; col < ncols(); ++col)
60                         os << cell(index(row, col)) << ' ';
61                 os << ']';
62         }
63         os << ']';
64 }