OEMatrix¶
class OEMatrix
OEMatrix class represents a Matrix.
- The OEMatrix class defines the following public methods:
Constructors¶
OEMatrix()
OEMatrix(const unsigned numRow, const unsigned numCol)
OEMatrix(const unsigned numRow, const unsigned numCol, const double initialValue)
OEMatrix(const OEMatrix&)
Default and copy constructors.
The default constructor creates an empty matrix. The second overload creates a matrix with numRows rows and numCols columns, with all the values set to zero. The third overload creates a matrix with numRows rows and numCols columns, with all the values set to initialValue.
AddRow¶
void AddRow();
void AddRow(const double initialValue);
Add a new row to the matrix. The new row is initialized with zero, unless initialValue is provided.
GetData¶
const std::vector<double>& GetData() const;
Get the contents of the matrix. The data is organized sequentially from the first row to the last.
Resize¶
void Resize(const unsigned numRow, const unsigned numCol);
void Resize(const unsigned numRow, const unsigned numCol, const double initialValue);
Resize the matrix to numRows rows and numCols columns. The matrix is initialized with zero, unless initialValue is provided.
SetRowData¶
void SetRowData(const unsigned iRow, const std::vector<double>& vecValues);
Set vecValues as content of the iRow-th row.