M4RIE
0.20120415
|
Functions | |
mzed_t * | mzed_cling (mzed_t *A, const mzd_slice_t *Z) |
Pack a bitslice matrix into a packed represenation. | |
mzd_slice_t * | mzed_slice (mzd_slice_t *A, const mzed_t *Z) |
Unpack the matrix Z into bitslice representation. | |
static mzd_slice_t * | mzd_slice_init (const gf2e *ff, const rci_t m, const rci_t n) |
Create a new matrix of dimension \( m \times n\) over ff. | |
static void | mzd_slice_free (mzd_slice_t *A) |
Free a matrix created with mzd_slice_init(). | |
static mzd_slice_t * | mzd_slice_concat (mzd_slice_t *C, const mzd_slice_t *A, const mzd_slice_t *B) |
Concatenate B to A and write the result to C. | |
static mzd_slice_t * | mzd_slice_stack (mzd_slice_t *C, const mzd_slice_t *A, const mzd_slice_t *B) |
Stack A on top of B and write the result to C. | |
static mzd_slice_t * | mzd_slice_submatrix (mzd_slice_t *S, const mzd_slice_t *A, const size_t lowr, const size_t lowc, const size_t highr, const size_t highc) |
Copy a submatrix. | |
static mzd_slice_t * | mzd_slice_init_window (const mzd_slice_t *A, const size_t lowr, const size_t lowc, const size_t highr, const size_t highc) |
Create a window/view into the matrix M. | |
static void | mzd_slice_free_window (mzd_slice_t *A) |
Free a matrix window created with mzd_slice_init_window(). | |
mzed_t * | mzed_init (const gf2e *ff, const rci_t m, const rci_t n) |
Create a new matrix of dimension m x n over ff. | |
void | mzed_free (mzed_t *A) |
Free a matrix created with mzed_init(). | |
static mzed_t * | mzed_concat (mzed_t *C, const mzed_t *A, const mzed_t *B) |
Concatenate B to A and write the result to C. | |
static mzed_t * | mzed_stack (mzed_t *C, const mzed_t *A, const mzed_t *B) |
Stack A on top of B and write the result to C. | |
static mzed_t * | mzed_submatrix (mzed_t *S, const mzed_t *M, const rci_t lowr, const rci_t lowc, const rci_t highr, const rci_t highc) |
Copy a submatrix. | |
static mzed_t * | mzed_init_window (const mzed_t *A, const rci_t lowr, const rci_t lowc, const rci_t highr, const rci_t highc) |
Create a window/view into the matrix A. | |
static void | mzed_free_window (mzed_t *A) |
Free a matrix window created with mzed_init_window(). |
static mzd_slice_t* mzd_slice_concat | ( | mzd_slice_t * | C, |
const mzd_slice_t * | A, | ||
const mzd_slice_t * | B | ||
) | [inline, static] |
Concatenate B to A and write the result to C.
That is,
[ A ], [ B ] -> [ A B ] = C
The inputs are not modified but a new matrix is created.
C | Matrix, may be NULL for automatic creation. |
A | Matrix. |
B | Matrix. |
static void mzd_slice_free | ( | mzd_slice_t * | A | ) | [inline, static] |
Free a matrix created with mzd_slice_init().
A | Matrix. |
static void mzd_slice_free_window | ( | mzd_slice_t * | A | ) | [inline, static] |
Free a matrix window created with mzd_slice_init_window().
A | Matrix |
static mzd_slice_t* mzd_slice_init | ( | const gf2e * | ff, |
const rci_t | m, | ||
const rci_t | n | ||
) | [inline, static] |
Create a new matrix of dimension \( m \times n\) over ff.
Use mzd_slice_free() to free it.
ff | Finite field |
m | Number of rows |
n | Number of columns |
static mzd_slice_t* mzd_slice_init_window | ( | const mzd_slice_t * | A, |
const size_t | lowr, | ||
const size_t | lowc, | ||
const size_t | highr, | ||
const size_t | highc | ||
) | [inline, static] |
Create a window/view into the matrix M.
A matrix window for M is a meta structure on the matrix M. It is setup to point into the matrix so M must not be freed while the matrix window is used.
This function puts the restriction on the provided parameters that all parameters must be within range for M which is not currently enforced.
Use mzd_slice_free_window() to free the window.
A | Matrix |
lowr | Starting row (inclusive) |
lowc | Starting column (inclusive) |
highr | End row (exclusive) |
highc | End column (exclusive) |
static mzd_slice_t* mzd_slice_stack | ( | mzd_slice_t * | C, |
const mzd_slice_t * | A, | ||
const mzd_slice_t * | B | ||
) | [inline, static] |
Stack A on top of B and write the result to C.
That is,
[ A ], [ B ] -> [ A ] = C [ B ]
The inputs are not modified but a new matrix is created.
C | Matrix, may be NULL for automatic creation |
A | Matrix |
B | Matrix |
static mzd_slice_t* mzd_slice_submatrix | ( | mzd_slice_t * | S, |
const mzd_slice_t * | A, | ||
const size_t | lowr, | ||
const size_t | lowc, | ||
const size_t | highr, | ||
const size_t | highc | ||
) | [inline, static] |
Copy a submatrix.
S | Preallocated space for submatrix, may be NULL for automatic creation. |
A | Matrix |
lowr | start rows |
lowc | start column |
highr | stop row (this row is not included) |
highc | stop column (this column is not included) |
mzed_t* mzed_cling | ( | mzed_t * | A, |
const mzd_slice_t * | Z | ||
) |
Pack a bitslice matrix into a packed represenation.
A | Matrix over GF(2^k) or NULL |
Z | Bitslice matrix over GF(2^k) |
static mzed_t* mzed_concat | ( | mzed_t * | C, |
const mzed_t * | A, | ||
const mzed_t * | B | ||
) | [inline, static] |
Concatenate B to A and write the result to C.
That is,
[ A ], [ B ] -> [ A B ] = C
The inputs are not modified but a new matrix is created.
C | Matrix, may be NULL for automatic creation |
A | Matrix |
B | Matrix |
Free a matrix created with mzed_init().
A | Matrix |
static void mzed_free_window | ( | mzed_t * | A | ) | [inline, static] |
Free a matrix window created with mzed_init_window().
A | Matrix |
Create a new matrix of dimension m x n over ff.
Use mzed_free() to kill it.
ff | Finite field |
m | Number of rows |
n | Number of columns |
static mzed_t* mzed_init_window | ( | const mzed_t * | A, |
const rci_t | lowr, | ||
const rci_t | lowc, | ||
const rci_t | highr, | ||
const rci_t | highc | ||
) | [inline, static] |
Create a window/view into the matrix A.
A matrix window for A is a meta structure on the matrix A. It is setup to point into the matrix so M must not be freed while the matrix window is used.
This function puts the restriction on the provided parameters that all parameters must be within range for A which is not currently enforced.
Use mzed_free_window() to free the window.
A | Matrix |
lowr | Starting row (inclusive) |
lowc | Starting column (inclusive) |
highr | End row (exclusive) |
highc | End column (exclusive) |
mzd_slice_t* mzed_slice | ( | mzd_slice_t * | A, |
const mzed_t * | Z | ||
) |
Unpack the matrix Z into bitslice representation.
A | Bitslice matrix or NULL |
Z | Input matrix |
static mzed_t* mzed_stack | ( | mzed_t * | C, |
const mzed_t * | A, | ||
const mzed_t * | B | ||
) | [inline, static] |
Stack A on top of B and write the result to C.
That is,
[ A ], [ B ] -> [ A ] = C [ B ]
The inputs are not modified but a new matrix is created.
C | Matrix, may be NULL for automatic creation |
A | Matrix |
B | Matrix |
static mzed_t* mzed_submatrix | ( | mzed_t * | S, |
const mzed_t * | M, | ||
const rci_t | lowr, | ||
const rci_t | lowc, | ||
const rci_t | highr, | ||
const rci_t | highc | ||
) | [inline, static] |
Copy a submatrix.
Note that the upper bounds are not included.
S | Preallocated space for submatrix, may be NULL for automatic creation. |
M | Matrix |
lowr | start rows |
lowc | start column |
highr | stop row (this row is not included) |
highc | stop column (this column is not included) |