M4RIE 20250128
Loading...
Searching...
No Matches
Assignment and basic manipulation

Functions

static void mzd_poly_randomize (mzd_poly_t *A)
 Fill matrix A with random elements.
 
void mzd_slice_set_ui (mzd_slice_t *A, word value)
 Return diagonal matrix with value on the diagonal.
 
static word mzd_slice_read_elem (const mzd_slice_t *A, const rci_t row, const rci_t col)
 Get the element at position (row,col) from the matrix A.
 
static void mzd_slice_add_elem (mzd_slice_t *A, const rci_t row, const rci_t col, word elem)
 At the element elem to the element at position (row,col) in the matrix A.
 
static void mzd_slice_write_elem (mzd_slice_t *A, const rci_t row, const rci_t col, word elem)
 Write the element elem to the position (row,col) in the matrix A.
 
static void mzd_slice_randomize (mzd_slice_t *A)
 Fill matrix A with random elements.
 
void mzed_randomize (mzed_t *A)
 Fill matrix A with random elements.
 
mzed_tmzed_copy (mzed_t *B, const mzed_t *A)
 Copy matrix A to B.
 
void mzed_set_ui (mzed_t *A, word value)
 Return diagonal matrix with value on the diagonal.
 
static word mzed_read_elem (const mzed_t *A, const rci_t row, const rci_t col)
 Get the element at position (row,col) from the matrix A.
 
static void mzed_add_elem (mzed_t *A, const rci_t row, const rci_t col, const word elem)
 At the element elem to the element at position (row,col) in the matrix A.
 
static void mzed_write_elem (mzed_t *A, const rci_t row, const rci_t col, const word elem)
 Write the element elem to the position (row,col) in the matrix A.
 

Detailed Description

Function Documentation

◆ mzd_poly_randomize()

static void mzd_poly_randomize ( mzd_poly_t * A)
inlinestatic

Fill matrix A with random elements.

Parameters
AMatrix
Todo
Allow the user to provide a RNG callback.

◆ mzd_slice_add_elem()

static void mzd_slice_add_elem ( mzd_slice_t * A,
const rci_t row,
const rci_t col,
word elem )
inlinestatic

At the element elem to the element at position (row,col) in the matrix A.

Parameters
ATarget matrix.
rowStarting row.
colStarting column.
elemfinite field element.
Todo
This function is considerably slower than it needs to be.

◆ mzd_slice_randomize()

static void mzd_slice_randomize ( mzd_slice_t * A)
inlinestatic

Fill matrix A with random elements.

Parameters
AMatrix
Todo
Allow the user to provide a RNG callback.

◆ mzd_slice_read_elem()

static word mzd_slice_read_elem ( const mzd_slice_t * A,
const rci_t row,
const rci_t col )
inlinestatic

Get the element at position (row,col) from the matrix A.

Parameters
ASource matrix.
rowStarting row.
colStarting column.
Todo
This function is considerably slower than it needs to be.

◆ mzd_slice_set_ui()

void mzd_slice_set_ui ( mzd_slice_t * A,
word value )

Return diagonal matrix with value on the diagonal.

If the matrix is not square then the largest possible square submatrix is used.

Parameters
AMatrix.
valueFinite Field element.

◆ mzd_slice_write_elem()

static void mzd_slice_write_elem ( mzd_slice_t * A,
const rci_t row,
const rci_t col,
word elem )
inlinestatic

Write the element elem to the position (row,col) in the matrix A.

Parameters
ATarget matrix.
rowStarting row.
colStarting column.
elemfinite field element.
Todo
This function is considerably slower than it needs to be.

◆ mzed_add_elem()

static void mzed_add_elem ( mzed_t * A,
const rci_t row,
const rci_t col,
const word elem )
inlinestatic

At the element elem to the element at position (row,col) in the matrix A.

Parameters
ATarget matrix.
rowStarting row.
colStarting column.
elemfinite field element.

◆ mzed_copy()

mzed_t * mzed_copy ( mzed_t * B,
const mzed_t * A )

Copy matrix A to B.

Parameters
BMay be NULL for automatic creation.
ASource matrix.

◆ mzed_randomize()

void mzed_randomize ( mzed_t * A)

Fill matrix A with random elements.

Parameters
AMatrix
Todo
Allow the user to provide a RNG callback.

◆ mzed_read_elem()

static word mzed_read_elem ( const mzed_t * A,
const rci_t row,
const rci_t col )
inlinestatic

Get the element at position (row,col) from the matrix A.

Parameters
ASource matrix.
rowStarting row.
colStarting column.

◆ mzed_set_ui()

void mzed_set_ui ( mzed_t * A,
word value )

Return diagonal matrix with value on the diagonal.

If the matrix is not square then the largest possible square submatrix is used.

Parameters
AMatrix
valueFinite Field element

◆ mzed_write_elem()

static void mzed_write_elem ( mzed_t * A,
const rci_t row,
const rci_t col,
const word elem )
inlinestatic

Write the element elem to the position (row,col) in the matrix A.

Parameters
ATarget matrix.
rowStarting row.
colStarting column.
elemfinite field element.