![]() |
PIP 5.5.3
Platform-Independent Primitives
|
A class for dynamic size and fixed type matrix. More...
#include <pimathmatrix.h>

Public Member Functions | |
| PIMathMatrix (const uint cols=0, const uint rows=0, const Type &f=Type()) | |
| Constructor of class PIMathMatrix, which creates a matrix. More... | |
| PIMathMatrix (const uint cols, const uint rows, const PIVector< Type > &val) | |
| Constructor of class PIMathMatrix, which creates a matrix. More... | |
| PIMathMatrix (const PIVector< PIVector< Type > > &val) | |
| Constructor of class PIMathMatrix, which creates a matrix. More... | |
| PIMathMatrix (const PIVector2D< Type > &val) | |
| Constructor of class PIMathMatrix, which creates a matrix. More... | |
| PIMathMatrix< Type > & | setCol (uint index, const PIMathVector< Type > &v) |
| Set the selected column in matrix. More... | |
| PIMathMatrix< Type > & | setRow (uint index, const PIMathVector< Type > &v) |
| Set the selected row in matrix. More... | |
| PIMathMatrix< Type > & | swapCols (uint r0, uint r1) |
| Method which swaps selected columns in a matrix. More... | |
| PIMathMatrix< Type > & | swapRows (uint c0, uint c1) |
| Method which replace selected rows in a matrix. More... | |
| PIMathMatrix< Type > & | fill (const Type &v) |
| Method which fills the matrix with selected value. More... | |
| bool | isSquare () const |
| Method which checks if matrix is square. More... | |
| bool | isIdentity () const |
| Method which checks if main diagonal of matrix consists of ones and another elements are zeros. More... | |
| bool | isNull () const |
| Method which checks if every elements of matrix are zeros. More... | |
| bool | isValid () const |
| Method which checks if matrix is empty. More... | |
| void | operator+= (const PIMathMatrix< Type > &sm) |
Addition assignment with matrix sm. More... | |
| void | operator-= (const PIMathMatrix< Type > &sm) |
Subtraction assignment with matrix sm. More... | |
| void | operator*= (const Type &v) |
Multiplication assignment with value v. More... | |
| void | operator/= (const Type &v) |
Division assignment with value v. More... | |
| PIMathMatrix< Type > | operator- () const |
| Negation operation. More... | |
| PIMathMatrix< Type > | operator+ (const PIMathMatrix< Type > &sm) const |
| Matrix addition. More... | |
| PIMathMatrix< Type > | operator- (const PIMathMatrix< Type > &sm) const |
| Matrix substraction. More... | |
| PIMathMatrix< Type > | operator* (const Type &v) const |
| Matrix multiplication. More... | |
| PIMathMatrix< Type > | operator/ (const Type &v) const |
| Matrix division. More... | |
| Type | determinant (bool *ok=0) const |
| ​Calculate Determinant of the matrix. More... | |
| Type | trace () const |
| Calculate the trace of a matrix. More... | |
| PIMathMatrix< Type > & | toUpperTriangular (bool *ok=0) |
| Transforming matrix to upper triangular. More... | |
| PIMathMatrix< Type > & | invert (bool *ok=0, PIMathVector< Type > *sv=0) |
| Matrix inversion operation. More... | |
| PIMathMatrix< Type > | inverted (bool *ok=0) const |
| Matrix inversion operation. More... | |
| PIMathMatrix< Type > | transposed () const |
| Matrix transposition operation. More... | |
Static Public Member Functions | |
| static PIMathMatrix< Type > | identity (const uint cols, const uint rows) |
| Creates a matrix whose main diagonal is filled with ones and the remaining elements are zeros. More... | |
| static PIMathMatrix< Type > | matrixRow (const PIMathVector< Type > &val) |
| Creates a row matrix of every element that is equal to every element of the vector. More... | |
| static PIMathMatrix< Type > | matrixCol (const PIMathVector< Type > &val) |
| Creates a column matrix of every element that is equal to every element of the vector. More... | |
A class for dynamic size and fixed type matrix.
| `Type` | There are can be basic C++ language data and different classes where the arithmetic operators(=, +=, -=, *=, /=, ==, !=, +, -, *, /) of the C++ language are implemented. |
|
inline |
Constructor of class PIMathMatrix, which creates a matrix.
| cols | is number of matrix column uint type. |
| rows | is number of matrix row uint type. |
| f | is type of matrix elements. |
|
inline |
Constructor of class PIMathMatrix, which creates a matrix.
| cols | is number of matrix column uint type |
| rows | is number of matrix row uint type |
| val | is PIVector<Type> of matrix elements |
|
inline |
Constructor of class PIMathMatrix, which creates a matrix.
| val | is PIVector<Type> of PIVector, which creates matrix. |
|
inline |
Constructor of class PIMathMatrix, which creates a matrix.
| val | is PIVector2D<Type>, which creates matrix. |
|
inlinestatic |
Creates a matrix whose main diagonal is filled with ones and the remaining elements are zeros.
| cols | is number of matrix column uint type |
| rows | is number of matrix row uint type |
|
inlinestatic |
Creates a row matrix of every element that is equal to every element of the vector.
| val | is the vector type PIMathVector |
|
inlinestatic |
Creates a column matrix of every element that is equal to every element of the vector.
| val | is the vector type PIMathVector |
|
inline |
Set the selected column in matrix.
If there are more elements of the vector than elements in the column of the matrix or index larger than the number of columns otherwise there will be "undefined behavior".
| index | is the number of the selected column. |
| v | is a vector of the type PIMathVector<Type> that needs to fill the column. |
|
inline |
Set the selected row in matrix.
If there are more elements of the vector than elements in the row of the matrix, or index larger than the number of rows otherwise there will be "undefined behavior".
| index | is the number of the selected row. |
| v | is a vector of the type PIMathVector<Type> that needs to fill the row. |
|
inline |
Method which swaps selected columns in a matrix.
You cannot use an index larger than the number of columns, otherwise there will be "undefined behavior".
| r0 | is the number of the first selected column. |
| r1 | is the number of the second selected column. |
|
inline |
Method which replace selected rows in a matrix.
You cannot use an index larger than the number of rows, otherwise there will be "undefined behavior"
| c0 | is the number of the first selected row. |
| c1 | is the number of the second selected row. |
|
inline |
Method which fills the matrix with selected value.
| v | is a parameter the type and value of which is selected and later filled into the matrix. |
|
inline |
Method which checks if matrix is square.
|
inline |
Method which checks if main diagonal of matrix consists of ones and another elements are zeros.
|
inline |
Method which checks if every elements of matrix are zeros.
|
inline |
Method which checks if matrix is empty.
|
inline |
Addition assignment with matrix sm.
| sm | matrix for the addition assigment. |
|
inline |
Subtraction assignment with matrix sm.
| sm | matrix for the subtraction assigment. |
|
inline |
Multiplication assignment with value v.
| v | value for the multiplication assigment. |
|
inline |
Division assignment with value v.
| v | value for the division assigment. |
|
inline |
Negation operation.
|
inline |
Matrix addition.
| sm | is matrix term. |
|
inline |
Matrix substraction.
| sm | is matrix subtrahend. |
|
inline |
Matrix multiplication.
| v | is value factor. |
|
inline |
Matrix division.
| v | is value divider. |
|
inline |
​Calculate Determinant of the matrix.
Works only with square matrix, nonzero matrices and invertible matrix.
| ok | is a parameter with which we can find out if the method worked correctly. |
|
inline |
Calculate the trace of a matrix.
Works only with square matrix matrix.
|
inline |
Transforming matrix to upper triangular.
Works only with square matrix, nonzero matrices and invertible matrix.
| ok | is a parameter with which we can find out if the method worked correctly. |
|
inline |
Matrix inversion operation.
Works only with square matrix, nonzero matrices and invertible matrix.
| ok | is a parameter with which we can find out if the method worked correctly. |
|
inline |
Matrix inversion operation.
Works only with square matrix, nonzero matrices and invertible matrix.
| ok | is a parameter with which we can find out if the method worked correctly. |
|
inline |
Matrix transposition operation.
Works only with square matrix matrix.