Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: BNO080_stm32_compatible
BasicIndexMatrix< Rows, Cols, value_type > Class Template Reference
Class that layers on operator[] functionality for typical matrices. More...
#include <tmatrix.h>
Inherits BasicMatrix< Rows, Cols, value_type >.
Inherited by TMatrix< Rows, Cols, value_type >.
Public Member Functions | |
| template<uint16_t RhsCols> | |
| TMatrix< Rows, RhsCols, value_type > | operator* (const TMatrix< Cols, RhsCols, value_type > &rhs) const |
| Matrix multiplication operator. | |
| TMatrix< Rows, Cols, value_type > | operator* (value_type s) const |
| Scalar multiplication operator. | |
| TMatrix< Rows, Cols, value_type > | operator+ (const TMatrix< Rows, Cols, value_type > &rhs) const |
| Element-wise addition operator. | |
| TMatrix< Rows, Cols, value_type > | operator- (const TMatrix< Rows, Cols, value_type > &rhs) const |
| Element-wise subtraction operator. | |
| TMatrix< Rows, Cols, value_type > | operator- (void) const |
| Unary negation operator. | |
| TMatrix< Rows, Cols, value_type > | operator/ (value_type s) const |
| Scalar division operator. | |
| TMatrix< Cols, Rows, value_type > | transpose (void) const |
| Returns the matrix transpose of this matrix. | |
| value_type | sum (void) const |
| Returns the sum of the matrix entries. | |
| value_type | sumLog (void) const |
| Returns the sum of the log of the matrix entries. | |
| TMatrix< Rows, Cols, value_type > | recip (void) const |
| Returns this vector with its elements replaced by their reciprocals. | |
| TMatrix< Rows, Cols, value_type > | pseudoRecip (double epsilon=1e-50) const |
| Returns this vector with its elements replaced by their reciprocals, unless a value is less than epsilon, in which case it is left as zero. | |
| bool | hasNaN (void) const |
| Checks to see if any of this matrix's elements are NaN. | |
Static Public Member Functions | |
| static TMatrix< Rows, Cols, value_type > | identity () |
| Returns an "identity" matrix with dimensions given by the class's template parameters. | |
| static TMatrix< Rows, Cols, value_type > | one () |
| Returns a ones matrix with dimensions given by the class's template parameters. | |
| static TMatrix< Rows, Cols, value_type > | zero () |
| Returns a zero matrix with dimensions given by the class's template parameters. | |
Data Fields | |
| TMatrix<(Rows > Cols | Cols:Rows |
| Returns the diagonal elements of the matrix. | |
Detailed Description
template<uint16_t Rows, uint16_t Cols, typename value_type>
class BasicIndexMatrix< Rows, Cols, value_type >
Class that layers on operator[] functionality for typical matrices.
Definition at line 36 of file tmatrix.h.
Member Function Documentation
| bool hasNaN | ( | void | ) | const [inherited] |
Returns an "identity" matrix with dimensions given by the class's template parameters.
In the case that Rows != Cols, this matrix is simply the one where the Aii elements for i < min(Rows, Cols) are 1, and all other elements are 0.
- Returns:
- A TMatrix<Rows, Cols, value_type> with off-diagonal elements set to 0, and diagonal elements set to 1.
| value_type sum | ( | void | ) | const [inherited] |
| value_type sumLog | ( | void | ) | const [inherited] |
Field Documentation
Generated on Wed Jul 13 2022 01:59:49 by
1.7.2