]> git.lyx.org Git - lyx.git/blob - src/mathed/math_matrixinset.C
Strip out redundant #includes
[lyx.git] / src / mathed / math_matrixinset.C
1 /**
2  * \file math_matrixinset.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "math_matrixinset.h"
14 #include "math_mathmlstream.h"
15
16 using std::auto_ptr;
17
18
19 MathMatrixInset::MathMatrixInset(MathGridInset const & p)
20         : MathGridInset(p)
21 {}
22
23
24 auto_ptr<InsetBase> MathMatrixInset::clone() const
25 {
26         return auto_ptr<InsetBase>(new MathMatrixInset(*this));
27 }
28
29
30 void MathMatrixInset::write(WriteStream & os) const
31 {
32         MathGridInset::write(os);
33 }
34
35
36 void MathMatrixInset::normalize(NormalStream & os) const
37 {
38         MathGridInset::normalize(os);
39 }
40
41
42 void MathMatrixInset::maple(MapleStream & os) const
43 {
44         os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
45         for (idx_type idx = 0; idx < nargs(); ++idx) {
46                 if (idx)
47                         os << ',';
48                 os << cell(idx);
49         }
50         os << "])";
51 }
52
53
54 void MathMatrixInset::maxima(MaximaStream & os) const
55 {
56         os << "matrix(";
57         for (row_type row = 0; row < nrows(); ++row) {
58                 if (row)
59                         os << ',';
60                 os << '[';
61                 for (col_type col = 0; col < ncols(); ++col) {
62                         if (col)
63                                 os << ',';
64                         os << cell(index(row, col));
65                 }
66                 os << ']';
67         }
68         os << ')';
69 }
70
71
72 void MathMatrixInset::mathmlize(MathMLStream & os) const
73 {
74         MathGridInset::mathmlize(os);
75 }
76
77
78 void MathMatrixInset::octave(OctaveStream & os) const
79 {
80         os << '[';
81         for (row_type row = 0; row < nrows(); ++row) {
82                 if (row)
83                         os << ';';
84                 os << '[';
85                 for (col_type col = 0; col < ncols(); ++col)
86                         os << cell(index(row, col)) << ' ';
87                 os << ']';
88         }
89         os << ']';
90 }