OEMatrix
class OEMatrix
OEMatrix class represents a Matrix.
- The OEMatrix class defines the following public methods:
Constructors
OEMatrix() -> OEMatrix
OEMatrix(arg2: OEMatrix) -> OEMatrix
OEMatrix(numRow: int, numCol: int, initialValue: float = 0.0) -> 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
AddRow(initialValue: float = 0.0) -> None
Add a new row to the matrix. The new row is initialized with zero, unless initialValue is provided.
Clear
Clear() -> None
Clear the matrix.
GetData
GetData() -> OEDoubleVector
Get the contents of the matrix. The data is organized sequentially from the first row to the last.
GetNumColumns
GetNumColumns() -> int
Returns the number of columns in the matrix.
GetNumRows
GetNumRows() -> int
Returns the number of rows in the matrix.
Resize
Resize(numRow: int, numCol: int, initialValue: float = 0.0) -> None
Resize the matrix to numRows rows and numCols columns. The matrix is initialized with zero, unless initialValue is provided.
SetRowData
SetRowData(iRow: int, vecValues: OEDoubleVector) -> None
Set vecValues as content of the iRow-th row.
Transpose
Transpose() -> OEMatrix
Returns the transpose of the matrix.