1 #ifndef __FloatMatrix_h__
2 #define __FloatMatrix_h__
13 arm_matrix_instance_f32 instance;
21 FloatMatrix(
float* data,
size_t rows,
size_t columns);
22 FloatMatrix(
const float* data,
size_t rows,
size_t columns);
31 return instance.numRows;
39 return instance.numCols;
87 void add(
float scalar);
137 return instance.pData;
This class contains useful methods for manipulating NxN dimensioned matrices of floats.
static FloatMatrix create(size_t rows, size_t columns)
Creates a new FloatMatrix.
float getElement(int row, int col)
Get a single float stored in the FloatMatrix.
void clear()
Clear the array.
float * operator[](const int index)
size_t getColumns() const
static void destroy(FloatMatrix array)
Destroys a FloatMatrix created with the create() method.
void multiply(FloatMatrix operand2, FloatMatrix destination)
Element-wise multiplication between arrays.
void setAll(float value)
Set all the values in the array.
size_t getSize() const
Get the number of elements in this matrix.
void add(FloatMatrix operand2, FloatMatrix destination)
Element-wise sum between matrices.
void copyFrom(FloatMatrix source)
Copies the content of another matrix into this matrix.
void setElement(int row, int col, float value)
Set a single float in the FloatMatrix.
void copyTo(FloatMatrix destination)
Copies the content of this matrix to another matrix.
float * getData()
Get the data stored in the FloatMatrix.