Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Defines | Functions

Matrix Library
[Other]

Files

file  math-matrix.h
 

Matrix library.


Defines

#define NR_END   1
#define MATRIX_MAX_SIZE   10

Functions

void matrixPrintF (float *matrix, int numRows, int numCols, char *label)
void matrixPrintL (long *matrix, int numRows, int numCols, char *label)
void matrixCopyF (float *source, int numRows, int numCols, float *destination)
void matrixCopyL (long *source, int numRows, int numCols, long *destination)
void matrixMultF (float *matrixA, float *matrixB, int numRowsA, int numColsA, int numColsB, float *matrixC)
void matrixMultL (long *matrixA, long *matrixB, int numRowsA, int numColsA, int numColsB, long *matrixC)
void matrixAddF (float *matrixA, float *matrixB, int numRowsA, int numColsA, float *matrixC)
void matrixAddL (long *matrixA, long *matrixB, int numRowsA, int numColsA, long *matrixC)
void matrixSubtractF (float *matrixA, float *matrixB, int numRowsA, int numColsA, float *matrixC)
void matrixSubtractL (long *matrixA, long *matrixB, int numRowsA, int numColsA, long *matrixC)
void matrixTransposeF (float *matrixA, int numRowsA, int numColsA, float *matrixC)
void matrixTransposeL (long *matrixA, int numRowsA, int numColsA, long *matrixC)

Detailed Description

matrix Math Library


Define Documentation

#define MATRIX_MAX_SIZE   10

Definition at line 39 of file math-matrix.h.

#define NR_END   1

Definition at line 37 of file math-matrix.h.


Function Documentation

void matrixAddF ( float *  matrixA,
float *  matrixB,
int  numRowsA,
int  numColsA,
float *  matrixC 
)

Adds values of two matrices

This function is for floats

Parameters:
matrixAthe first matrix to be added
matrixBthe second matrix to be added
numRowsAthe number of rows of both matrices
numColsAthe number of columns of both matrices
matrixCthe resulting matrix

Definition at line 176 of file math-matrix.h.

void matrixAddL ( long *  matrixA,
long *  matrixB,
int  numRowsA,
int  numColsA,
long *  matrixC 
)

Adds values of two matrices

This function is for longs

Parameters:
matrixAthe first matrix to be added
matrixBthe second matrix to be added
numRowsAthe number of rows of both matrices
numColsAthe number of columns of both matrices
matrixCthe resulting matrix

Definition at line 195 of file math-matrix.h.

void matrixCopyF ( float *  source,
int  numRows,
int  numCols,
float *  destination 
)

Copies all the values from one matrix into another

This function is for floats

Parameters:
sourcethe matrix which is to be copied
numRowsthe number of rows in the source matrix
numColsthe number of columns in the source matrix
destinationthe matrix to copy to

Definition at line 97 of file math-matrix.h.

void matrixCopyL ( long *  source,
int  numRows,
int  numCols,
long *  destination 
)

Copies all the values from one matrix into another

This function is for longs

Parameters:
sourcethe matrix which is to be copied
numRowsthe number of rows in the source matrix
numColsthe number of columns in the source matrix
destinationthe matrix to copy to

Definition at line 112 of file math-matrix.h.

void matrixMultF ( float *  matrixA,
float *  matrixB,
int  numRowsA,
int  numColsA,
int  numColsB,
float *  matrixC 
)

Copies all the values from one matrix into another

This function is for floats

Parameters:
matrixAthe first matrix to be multiplied
matrixBthe second matrix to be multiplied
numRowsAthe number of rows in the first matrix
numColsAthe number of columns in the first matrix
numColsBthe number of columns in the second matrix
matrixCthe resulting matrix

Definition at line 129 of file math-matrix.h.

void matrixMultL ( long *  matrixA,
long *  matrixB,
int  numRowsA,
int  numColsA,
int  numColsB,
long *  matrixC 
)

Copies all the values from one matrix into another

This function is for longs

Parameters:
matrixAthe first matrix to be multiplied
matrixBthe second matrix to be multiplied
numRowsAthe number of rows in the first matrix
numColsAthe number of columns in the first matrix
numColsBthe number of columns in the second matrix
matrixCthe resulting matrix

Definition at line 153 of file math-matrix.h.

void matrixPrintF ( float *  matrix,
int  numRows,
int  numCols,
char *  label 
)

Prints a nicely formatted version of the matrix to the debugstream

This function is for floats

Parameters:
matrixthe matrix to be printed
numRowsthe number of rows in the matrix
numColsthe number of columns in the matrix
labelthe label to use when printing the matrix

Definition at line 51 of file math-matrix.h.

void matrixPrintL ( long *  matrix,
int  numRows,
int  numCols,
char *  label 
)

Prints a nicely formatted version of the matrix to the debugstream

This function is for longs

Parameters:
matrixthe matrix to be printed
numRowsthe number of rows in the matrix
numColsthe number of columns in the matrix
labelthe label to use when printing the matrix

Definition at line 74 of file math-matrix.h.

void matrixSubtractF ( float *  matrixA,
float *  matrixB,
int  numRowsA,
int  numColsA,
float *  matrixC 
)

Adds values of two matrices

This function is for floats

Parameters:
matrixAthe first matrix to be added
matrixBthe second matrix to be added
numRowsAthe number of rows of both matrices
numColsAthe number of columns of both matrices
matrixCthe resulting matrix

Definition at line 214 of file math-matrix.h.

void matrixSubtractL ( long *  matrixA,
long *  matrixB,
int  numRowsA,
int  numColsA,
long *  matrixC 
)

Adds values of two matrices

This function is for longs

Parameters:
matrixAthe first matrix to be added
matrixBthe second matrix to be added
numRowsAthe number of rows of both matrices
numColsAthe number of columns of both matrices
matrixCthe resulting matrix

Definition at line 233 of file math-matrix.h.

void matrixTransposeF ( float *  matrixA,
int  numRowsA,
int  numColsA,
float *  matrixC 
)

Transpose a matrix

This function is for floats

Parameters:
matrixAthe first matrix to be transposed
numRowsAthe number of rows of matrixA
numColsAthe number of columns matrixA
matrixCthe resulting matrix

Definition at line 251 of file math-matrix.h.

void matrixTransposeL ( long *  matrixA,
int  numRowsA,
int  numColsA,
long *  matrixC 
)

Transpose a matrix

This function is for longs

Parameters:
matrixAthe first matrix to be transposed
numRowsAthe number of rows of matrixA
numColsAthe number of columns matrixA
matrixCthe resulting matrix

Definition at line 269 of file math-matrix.h.