Go to the source code of this file.
Data Structures | |
struct | _MATRIX |
Matrix Structure, represents a matrix. More... | |
Defines | |
#define | CreateMatrix(rows, cols) CreateMatrices(rows, cols, 1) |
Creates a single matrix of rows x cols. | |
#define | FreeMatrix(matrix) FreeMatrices(matrix,1) |
Frees a single matrix. | |
#define | CreateVector(rows) CreateMatrix(rows,1) |
Creates a vector of rows x 1. | |
#define | CreateVectors(rows, number) CreateMatrices(rows,1,number) |
Creates a number of vectors vector of rows x 1. | |
#define | FreeVector(vector) FreeMatrix(vector) |
Frees a vector (alias for FreeMatrix). | |
#define | FreeVectors(vectors, number) FreeMatrices(vectors, number) |
Frees an array of vectors (alias for FreeMatrices). | |
#define | MatrixAdd(one, two) MatrixAddSub(one,two,true); |
Adds two matrices together. | |
#define | MatrixSub(one, two) MatrixAddSub(one,two,false); |
Subtracts two matrices. | |
#define | false 0 |
#define | true 0 |
Typedefs | |
typedef unsigned char | bool |
typedef unsigned char | tinyint |
Smaller datatype used for loop counting etc. | |
typedef struct _MATRIX * | LPMATRIX |
Functions | |
LPMATRIX | CreateIdentityMatrix (tinyint rows) |
Returns a pointer to a new Matrix, that is the identity matrix for the size Row x Row. | |
LPMATRIX | CreateMatrices (tinyint rows, tinyint cols, tinyint number) |
Returns a pointer to an array of matrices size rows x cols. | |
void | FreeMatrices (LPMATRIX matrices, tinyint number) |
Frees an array of matrices. | |
LPMATRIX | MatrixCopy (LPMATRIX src) |
Creates a copy of a matrix and its internal data. | |
float | MatrixGet (const LPMATRIX matrix, tinyint row, tinyint col) |
Gets a cell of a matrix. | |
bool | MatrixSet (LPMATRIX matrix, tinyint row, tinyint col, float data) |
Sets a cell of a matrix. | |
void | MatrixSetAll (LPMATRIX matrix, float value) |
Sets an entire matrix to a single value. | |
LPMATRIX | MatrixAddSub (const LPMATRIX one, const LPMATRIX two, bool bAdd) |
Adds or subtracts two matrices. | |
LPMATRIX | MatrixMultiply (const LPMATRIX first, LPMATRIX second) |
Multiplies two matrices together. | |
LPMATRIX | MatrixTranspose (const LPMATRIX matrix) |
Tranposes a matrix. | |
LPMATRIX | MatrixInverse (const LPMATRIX matrix) |
Modified for a c environment, this performs an inversion of a symmetric square matrix. |
Declares all members and types for the shared MatrixLite Library
#define CreateMatrix | ( | rows, | |||
cols | ) | CreateMatrices(rows, cols, 1) |
Creates a single matrix of rows x cols.
rows | Number of rows | |
cols | Number of cols |
#define CreateVector | ( | rows | ) | CreateMatrix(rows,1) |
Creates a vector of rows x 1.
rows | Number of rows |
#define CreateVectors | ( | rows, | |||
number | ) | CreateMatrices(rows,1,number) |
Creates a number of vectors vector of rows x 1.
rows | number of rows | |
number | number to create in array |
#define false 0 |
#define FreeMatrix | ( | matrix | ) | FreeMatrices(matrix,1) |
Frees a single matrix.
matrix | Pointer to the matrix to free |
#define FreeVector | ( | vector | ) | FreeMatrix(vector) |
Frees a vector (alias for FreeMatrix).
vector | Pointer to a vector to free |
#define FreeVectors | ( | vectors, | |||
number | ) | FreeMatrices(vectors, number) |
Frees an array of vectors (alias for FreeMatrices).
vectors | Pointer to an array of vectors | |
number | Number of vectors in array |
#define MatrixAdd | ( | one, | |||
two | ) | MatrixAddSub(one,two,true); |
Adds two matrices together.
one | First Matrix | |
two | Second Matrix |
#define MatrixSub | ( | one, | |||
two | ) | MatrixAddSub(one,two,false); |
Subtracts two matrices.
one | First Matrix | |
two | Second Matrix |
#define true 0 |
typedef unsigned char bool |
typedef unsigned char tinyint |
Smaller datatype used for loop counting etc.
Returns a pointer to a new Matrix, that is the identity matrix for the size Row x Row.
rows | size of the matrix to return |
Returns a pointer to an array of matrices size rows x cols.
rows | Number of Rows in matrix | |
cols | Number of Columns in matrix | |
number | Numer of matrices to create |
Frees an array of matrices.
matrices | pointer to an array of matrices | |
number | the number of matrices in the array |
Adds or subtracts two matrices.
first | Pointer to a matrix | |
second | Pointer to another matrix | |
bAdd | True to perform addition, false for subtraction |
Creates a copy of a matrix and its internal data.
src | Source Matrix To copy |
Gets a cell of a matrix.
matrix | Pointer to the matrix | |
row | row to retrieve | |
col | column to retrieve |
Modified for a c environment, this performs an inversion of a symmetric square matrix.
Implementation of CholeskyCrout ganked from http://www.gpstk.org/doxygen/MatrixFunctors_8hpp-source.html#l00658 More ganks http://www.gpstk.org/doxygen/MatrixOperators_8hpp-source.html#l00544
matrix | Matrix to be inverted |
Multiplies two matrices together.
first | Pointer to a matrix | |
second | Pointer to a matrix |
Sets a cell of a matrix.
matrix | Pointer to the matrix | |
row | Row to set | |
col | Column to set |
void MatrixSetAll | ( | LPMATRIX | matrix, | |
float | value | |||
) |
Sets an entire matrix to a single value.
matrix | Pointer to the matrix | |
value | Value to set the matrix to |
Tranposes a matrix.
matrix | Pointer to the matrix to transpose |