36 #define ROW_VECTOR(mat, ndx) ((Vector) {mat.data[ndx], mat.nCol}) float vectorDotProd(const Vector *u, const Vector *v)
Calculates the dot product of two vectors.
Definition: matrix.c:126
void matrixVectorProduct(Vector *y, const Matrix *A, const Vector *x)
Multiplication of the form y = Ax
Definition: matrix.c:109
float * data
Definition: matrix.h:21
Data types for the gamecube.
bool _matrixError
Set to true when a error occurs in a matrix operation.
Definition: matrix.c:6
A vector of 32-bit floating-point values.
Definition: matrix.h:19
size_t nCol
Definition: matrix.h:31
void populateVec(Vector *vec, void *func)
Populate the values in a vector.
Definition: matrix.c:50
bool initVector(Vector *vec, size_t size)
Initialize a Vector.
Definition: matrix.c:34
size_t nRow
Definition: matrix.h:30
float ** data
Definition: matrix.h:29
bool initMatrix(Matrix *mat, size_t numRows, size_t numCols)
Initialize a matrix.
Definition: matrix.c:8
size_t size
Definition: matrix.h:22
A matrix of 32-bit floating-point values.
Definition: matrix.h:27
void populateMat(Matrix *mat, void *func)
Populate the values in a matrix.
Definition: matrix.c:60