M4RIE  0.20111004
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Functions
Constructions

Functions

mzed_tmzed_cling (mzed_t *A, const mzd_slice_t *Z)
 Pack a bitslice matrix into a packed represenation. More...
 
mzd_slice_tmzed_slice (mzd_slice_t *A, const mzed_t *Z)
 Unpack the matrix Z into bitslice representation. More...
 
static mzd_poly_tmzd_poly_init (const deg_t d, const rci_t m, const rci_t n)
 Create a new polynomial of degree d with m x n matrices as coefficients. More...
 
static void mzd_poly_free (mzd_poly_t *A)
 Free polynomial A. More...
 
static mzd_poly_t_mzd_poly_adapt_depth (mzd_poly_t *A, const deg_t new_depth)
 change depth of A to new_depth. More...
 
static mzd_slice_tmzd_slice_init (const gf2e *ff, const rci_t m, const rci_t n)
 Create a new matrix of dimension \( m \times n\) over ff. More...
 
static void mzd_slice_free (mzd_slice_t *A)
 Free a matrix created with mzd_slice_init(). More...
 
static mzd_slice_tmzd_slice_copy (mzd_slice_t *B, const mzd_slice_t *A)
 copy A to B More...
 
static mzd_slice_tmzd_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. More...
 
static mzd_slice_tmzd_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. More...
 
static mzd_slice_tmzd_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. More...
 
static mzd_slice_tmzd_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. More...
 
static void mzd_slice_free_window (mzd_slice_t *A)
 Free a matrix window created with mzd_slice_init_window(). More...
 
mzed_tmzed_init (const gf2e *ff, const rci_t m, const rci_t n)
 Create a new matrix of dimension m x n over ff. More...
 
void mzed_free (mzed_t *A)
 Free a matrix created with mzed_init(). More...
 
static mzed_tmzed_concat (mzed_t *C, const mzed_t *A, const mzed_t *B)
 Concatenate B to A and write the result to C. More...
 
static mzed_tmzed_stack (mzed_t *C, const mzed_t *A, const mzed_t *B)
 Stack A on top of B and write the result to C. More...
 
static mzed_tmzed_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. More...
 
static mzed_tmzed_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. More...
 
static void mzed_free_window (mzed_t *A)
 Free a matrix window created with mzed_init_window(). More...
 

Detailed Description

Function Documentation

static mzd_poly_t* _mzd_poly_adapt_depth ( mzd_poly_t A,
const deg_t  new_depth 
)
inlinestatic

change depth of A to new_depth.

Parameters
APolynomial.
new_depthNew depth (may be <,=,> than current depth).
static void mzd_poly_free ( mzd_poly_t A)
inlinestatic

Free polynomial A.

Parameters
APolynomial.
static mzd_poly_t* mzd_poly_init ( const deg_t  d,
const rci_t  m,
const rci_t  n 
)
inlinestatic

Create a new polynomial of degree d with m x n matrices as coefficients.

Parameters
dDegree.
mNumber of rows.
nNumber of columns.
static mzd_slice_t* mzd_slice_concat ( mzd_slice_t C,
const mzd_slice_t A,
const mzd_slice_t B 
)
inlinestatic

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.

Parameters
CMatrix, may be NULL for automatic creation.
AMatrix.
BMatrix.
Note
This is sometimes called augment.
static mzd_slice_t* mzd_slice_copy ( mzd_slice_t B,
const mzd_slice_t A 
)
inlinestatic

copy A to B

Parameters
BMatrix.
AMatrix.
static void mzd_slice_free ( mzd_slice_t A)
inlinestatic

Free a matrix created with mzd_slice_init().

Parameters
AMatrix.
Examples:
tests/test_multiplication.c.
static void mzd_slice_free_window ( mzd_slice_t A)
inlinestatic

Free a matrix window created with mzd_slice_init_window().

Parameters
AMatrix
static mzd_slice_t* mzd_slice_init ( const gf2e ff,
const rci_t  m,
const rci_t  n 
)
inlinestatic

Create a new matrix of dimension \( m \times n\) over ff.

Use mzd_slice_free() to free it.

Parameters
ffFinite field
mNumber of rows
nNumber 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 
)
inlinestatic

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.

Parameters
AMatrix
lowrStarting row (inclusive)
lowcStarting column (inclusive)
highrEnd row (exclusive)
highcEnd column (exclusive)
static mzd_slice_t* mzd_slice_stack ( mzd_slice_t C,
const mzd_slice_t A,
const mzd_slice_t B 
)
inlinestatic

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.

Parameters
CMatrix, may be NULL for automatic creation
AMatrix
BMatrix
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 
)
inlinestatic

Copy a submatrix.

Parameters
SPreallocated space for submatrix, may be NULL for automatic creation.
AMatrix
lowrstart rows
lowcstart column
highrstop row (this row is not included)
highcstop 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.

Parameters
AMatrix over \(\mathbb{F}_{2^e}\) or NULL
ZBitslice matrix over \(\mathbb{F}_{2^e}\)
static mzed_t* mzed_concat ( mzed_t C,
const mzed_t A,
const mzed_t B 
)
inlinestatic

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.

Parameters
CMatrix, may be NULL for automatic creation
AMatrix
BMatrix
Note
This is sometimes called augment.
void mzed_free ( mzed_t A)

Free a matrix created with mzed_init().

Parameters
AMatrix
static void mzed_free_window ( mzed_t A)
inlinestatic

Free a matrix window created with mzed_init_window().

Parameters
AMatrix
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.

Use mzed_free() to kill it.

Parameters
ffFinite field
mNumber of rows
nNumber 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 
)
inlinestatic

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.

Parameters
AMatrix
lowrStarting row (inclusive)
lowcStarting column (inclusive)
highrEnd row (exclusive)
highcEnd column (exclusive)
mzd_slice_t* mzed_slice ( mzd_slice_t A,
const mzed_t Z 
)

Unpack the matrix Z into bitslice representation.

Parameters
ABitslice matrix or NULL
ZInput matrix
static mzed_t* mzed_stack ( mzed_t C,
const mzed_t A,
const mzed_t B 
)
inlinestatic

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.

Parameters
CMatrix, may be NULL for automatic creation
AMatrix
BMatrix
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 
)
inlinestatic

Copy a submatrix.

Note that the upper bounds are not included.

Parameters
SPreallocated space for submatrix, may be NULL for automatic creation.
MMatrix
lowrstart rows
lowcstart column
highrstop row (this row is not included)
highcstop column (this column is not included)