|
| | Matrix () |
| | Constructs a non-initialized matrix.
|
| | Matrix (const Scalar &value) |
| | Constructs an initialized matrix.
|
| | Matrix (std::initializer_list< Scalar > values) |
| int | rows () const |
| | Returns the number of rows in the matrix.
|
| int | cols () const |
| | Returns the number of columns in the matrix.
|
| int | size () const |
| | Returns the number of total elements in the matrix.
|
| Scalar & | operator() (int rowIndex, int colIndex) |
| | Returns element at given row and column index (from 0..size-1).
|
| const Scalar & | operator() (int rowIndex, int colIndex) const |
| | Returns const element at given row and column index (from 0..size-1).
|
| std::string | toString () const |
| std::string | toPrettyString (int numberOfDigits=4) const |
| template<typename NewScalarType> |
| tarch::la::Matrix< Rows, Cols, NewScalarType > | convertScalar () const |
| Scalar * | data () |
| | This routine returns a pointer to the first data element.
|
| const Scalar * | data () const |
template<int Rows, int Cols, typename Scalar>
class tarch::la::Matrix< Rows, Cols, Scalar >
Static (i.e.
compiletime) sized matrix type.
Definition at line 42 of file Matrix.h.
template<int Rows, int Cols, typename Scalar>
This routine returns a pointer to the first data element.
Not a beautiful one as it harms the OO idea, but in many cases it is convenient to have this operation.
Definition at line 130 of file Matrix.h.
template<int Rows, int Cols, typename Scalar>
| Matrix< Rows, Cols, Scalar > buildMatrix |
( |
const Scalar * | values | ) |
|
|
friend |
Become friend of builder mechanism.
We faced issues with some compiler versions with offering a constructor that simply takes a pointer to scalars. Further to that, it is not clear if such a constructor would create a deep copy or a shallow copy. Therefore, I decided to introduce an explicit builder function.