Dynare++: add some comments
parent
52ec6b4e93
commit
c44545bb18
|
@ -34,9 +34,11 @@ public:
|
||||||
}
|
}
|
||||||
ConstGeneralMatrix(const ConstGeneralMatrix &m) = default;
|
ConstGeneralMatrix(const ConstGeneralMatrix &m) = default;
|
||||||
ConstGeneralMatrix(ConstGeneralMatrix &&m) = default;
|
ConstGeneralMatrix(ConstGeneralMatrix &&m) = default;
|
||||||
// Implicit conversion from ConstGeneralMatrix is ok, since it's cheap
|
// Implicit conversion from GeneralMatrix is ok, since it's cheap
|
||||||
ConstGeneralMatrix(const GeneralMatrix &m);
|
ConstGeneralMatrix(const GeneralMatrix &m);
|
||||||
|
// Create submatrix (with data sharing)
|
||||||
ConstGeneralMatrix(const GeneralMatrix &m, int i, int j, int nrows, int ncols);
|
ConstGeneralMatrix(const GeneralMatrix &m, int i, int j, int nrows, int ncols);
|
||||||
|
// Create submatrix (with data sharing)
|
||||||
ConstGeneralMatrix(const ConstGeneralMatrix &m, int i, int j, int nrows, int ncols);
|
ConstGeneralMatrix(const ConstGeneralMatrix &m, int i, int j, int nrows, int ncols);
|
||||||
virtual ~ConstGeneralMatrix() = default;
|
virtual ~ConstGeneralMatrix() = default;
|
||||||
|
|
||||||
|
@ -155,7 +157,9 @@ public:
|
||||||
GeneralMatrix(GeneralMatrix &&m) = default;
|
GeneralMatrix(GeneralMatrix &&m) = default;
|
||||||
GeneralMatrix(const GeneralMatrix &m, const std::string &dummy); // transpose
|
GeneralMatrix(const GeneralMatrix &m, const std::string &dummy); // transpose
|
||||||
GeneralMatrix(const ConstGeneralMatrix &m, const std::string &dummy); // transpose
|
GeneralMatrix(const ConstGeneralMatrix &m, const std::string &dummy); // transpose
|
||||||
|
// Create submatrix (with data copy)
|
||||||
GeneralMatrix(const GeneralMatrix &m, int i, int j, int nrows, int ncols);
|
GeneralMatrix(const GeneralMatrix &m, int i, int j, int nrows, int ncols);
|
||||||
|
// Create submatrix (with data sharing)
|
||||||
GeneralMatrix(GeneralMatrix &m, int i, int j, int nrows, int ncols);
|
GeneralMatrix(GeneralMatrix &m, int i, int j, int nrows, int ncols);
|
||||||
/* this = a*b */
|
/* this = a*b */
|
||||||
GeneralMatrix(const ConstGeneralMatrix &a, const ConstGeneralMatrix &b);
|
GeneralMatrix(const ConstGeneralMatrix &a, const ConstGeneralMatrix &b);
|
||||||
|
|
|
@ -97,26 +97,32 @@ public:
|
||||||
: GeneralMatrix(m, dummy)
|
: GeneralMatrix(m, dummy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
// Select only some columns (with data copy)
|
||||||
TwoDMatrix(const TwoDMatrix &m, int first_col, int num)
|
TwoDMatrix(const TwoDMatrix &m, int first_col, int num)
|
||||||
: GeneralMatrix(m, 0, first_col, m.numRows(), num)
|
: GeneralMatrix(m, 0, first_col, m.numRows(), num)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
// Select only some columns (with data sharing)
|
||||||
TwoDMatrix(TwoDMatrix &m, int first_col, int num)
|
TwoDMatrix(TwoDMatrix &m, int first_col, int num)
|
||||||
: GeneralMatrix(m, 0, first_col, m.numRows(), num)
|
: GeneralMatrix(m, 0, first_col, m.numRows(), num)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
// Select only some rows (with data copy)
|
||||||
TwoDMatrix(int first_row, int num, const TwoDMatrix &m)
|
TwoDMatrix(int first_row, int num, const TwoDMatrix &m)
|
||||||
: GeneralMatrix(m, first_row, 0, num, m.ncols())
|
: GeneralMatrix(m, first_row, 0, num, m.ncols())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
// Select only some rows (with data sharing)
|
||||||
TwoDMatrix(int first_row, int num, TwoDMatrix &m)
|
TwoDMatrix(int first_row, int num, TwoDMatrix &m)
|
||||||
: GeneralMatrix(m, first_row, 0, num, m.ncols())
|
: GeneralMatrix(m, first_row, 0, num, m.ncols())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
// Select a submatrix (with data sharing)
|
||||||
TwoDMatrix(TwoDMatrix &m, int first_row, int first_col, int rows, int cols)
|
TwoDMatrix(TwoDMatrix &m, int first_row, int first_col, int rows, int cols)
|
||||||
: GeneralMatrix(m, first_row, first_col, rows, cols)
|
: GeneralMatrix(m, first_row, first_col, rows, cols)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
// Select a submatrix (with data copy)
|
||||||
TwoDMatrix(const TwoDMatrix &m, int first_row, int first_col, int rows, int cols)
|
TwoDMatrix(const TwoDMatrix &m, int first_row, int first_col, int rows, int cols)
|
||||||
: GeneralMatrix(m, first_row, first_col, rows, cols)
|
: GeneralMatrix(m, first_row, first_col, rows, cols)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue