LIBFMSR  0.1
Functions
matrix.h File Reference

Contains prototypes for functions implemented in matrix.c. More...

#include "gf.h"

Go to the source code of this file.

Functions

void matrix_mul (gf *A, gf *B, gf *C, gf n, gf k, size_t m)
 Matrix multiplication, C = AB; A is n x k matrix and B is k x m matrix.
void matrix_mul_p (gf *A, gf *B, gf *C, gf n, gf k, size_t m, int num_threads)
 matrix_mul() distributed over (num_threads) threads
int matrix_invert (gf *A, gf k)
 Inverts a k x k matrix A.
gf matrix_rank (gf *A, gf n, gf m)
 Returns rank(A), where A is an n x m matrix.
int matrix_next_submatrix (gf *matrix, gf rows, gf cols, gf k, gf *excluded, gf num_excluded, gf *comb, gf *submatrix)
 Sample the next set of rows from matrix[] in the combinations (rows choose k).

Detailed Description

Contains prototypes for functions implemented in matrix.c.

Author:
Henry Chen (chchen@cse.cuhk.edu.hk)

Function Documentation

int matrix_invert ( gf A,
gf  k 
)

Inverts a k x k matrix A.

Returns:
0 on success and -1 if A is singular
void matrix_mul ( gf A,
gf B,
gf C,
gf  n,
gf  k,
size_t  m 
)

Matrix multiplication, C = AB; A is n x k matrix and B is k x m matrix.

void matrix_mul_p ( gf A,
gf B,
gf C,
gf  n,
gf  k,
size_t  m,
int  num_threads 
)

matrix_mul() distributed over (num_threads) threads

int matrix_next_submatrix ( gf matrix,
gf  rows,
gf  cols,
gf  k,
gf excluded,
gf  num_excluded,
gf comb,
gf submatrix 
)

Sample the next set of rows from matrix[] in the combinations (rows choose k).

We exclude rows in excluded[], and store results in submatrix[].

Returns:
0 when all combinations are exhausted
gf matrix_rank ( gf A,
gf  n,
gf  m 
)

Returns rank(A), where A is an n x m matrix.

Returns:
rank(A) on success and 0 for invalid input
 All Data Structures Files Functions Variables Typedefs Defines