M4RIE 20250128
Loading...
Searching...
No Matches
Addition and subtraction

Macros

#define mzd_slice_sub   mzd_slice_add
 \( C = A + B\).
 
#define _mzd_slice_sub   _mzd_slice_add
 \( C = A + B\).
 
#define mzed_sub   mzed_add
 \( C = A+B \).
 
#define _mzed_sub   _mzed_add
 \( C = A+B \).
 

Functions

static mzd_poly_t_mzd_poly_add (mzd_poly_t *C, const mzd_poly_t *A, const mzd_poly_t *B, unsigned int offset)
 C += (A+B)*x^offset.
 
static mzd_poly_tmzd_poly_add (mzd_poly_t *C, const mzd_poly_t *A, const mzd_poly_t *B)
 C += (A+B)
 
static mzd_slice_t_mzd_slice_add (mzd_slice_t *C, const mzd_slice_t *A, const mzd_slice_t *B)
 \( C = A + B\).
 
static mzd_slice_tmzd_slice_add (mzd_slice_t *C, const mzd_slice_t *A, const mzd_slice_t *B)
 \( C = A + B\).
 
mzed_tmzed_add (mzed_t *C, const mzed_t *A, const mzed_t *B)
 \( C = A+B \).
 
mzed_t_mzed_add (mzed_t *C, const mzed_t *A, const mzed_t *B)
 \( C = A+B \).
 

Detailed Description

Macro Definition Documentation

◆ _mzd_slice_sub

#define _mzd_slice_sub   _mzd_slice_add

\( C = A + B\).

Parameters
CPreallocated sum matrix, may be NULL for automatic creation.
AMatrix
BMatrix

◆ _mzed_sub

#define _mzed_sub   _mzed_add

\( C = A+B \).

Parameters
CPreallocated difference matrix, may be NULL for automatic creation.
AMatrix
BMatrix

◆ mzd_slice_sub

#define mzd_slice_sub   mzd_slice_add

\( C = A + B\).

C is also returned. If C is NULL then a new matrix is created which must be freed by mzd_slice_free().

Parameters
CPreallocated sum matrix, may be NULL for automatic creation.
AMatrix
BMatrix

◆ mzed_sub

#define mzed_sub   mzed_add

\( C = A+B \).

Parameters
CPreallocated difference matrix, may be NULL for automatic creation.
AMatrix
BMatrix

Function Documentation

◆ _mzd_poly_add()

static mzd_poly_t * _mzd_poly_add ( mzd_poly_t * C,
const mzd_poly_t * A,
const mzd_poly_t * B,
unsigned int offset )
inlinestatic

C += (A+B)*x^offset.

Parameters
CTarget polynomial.
ASource polynomial.
BSource polynomial.
offsetThe result is shifted offset entries upwards.
Warning
No bounds checks are performed.

◆ _mzd_slice_add()

static mzd_slice_t * _mzd_slice_add ( mzd_slice_t * C,
const mzd_slice_t * A,
const mzd_slice_t * B )
inlinestatic

\( C = A + B\).

Parameters
CPreallocated sum matrix.
AMatrix
BMatrix

◆ _mzed_add()

mzed_t * _mzed_add ( mzed_t * C,
const mzed_t * A,
const mzed_t * B )

\( C = A+B \).

Parameters
CPreallocated sum matrix, may be NULL for automatic creation.
AMatrix
BMatrix

◆ mzd_poly_add()

static mzd_poly_t * mzd_poly_add ( mzd_poly_t * C,
const mzd_poly_t * A,
const mzd_poly_t * B )
inlinestatic

C += (A+B)

Parameters
CTarget polynomial.
ASource polynomial.
BSource polynomial.

◆ mzd_slice_add()

static mzd_slice_t * mzd_slice_add ( mzd_slice_t * C,
const mzd_slice_t * A,
const mzd_slice_t * B )
inlinestatic

\( C = A + B\).

C is also returned. If C is NULL then a new matrix is created which must be freed by mzd_slice_free().

Parameters
CPreallocated sum matrix, may be NULL for automatic creation.
AMatrix
BMatrix

◆ mzed_add()

mzed_t * mzed_add ( mzed_t * C,
const mzed_t * A,
const mzed_t * B )

\( C = A+B \).

C is also returned. If C is NULL then a new matrix is created which must be freed by mzed_free().

Parameters
CPreallocated sum matrix, may be NULL for automatic creation.
AMatrix
BMatrix