M4RIE  0.20111004
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Macros | Functions
Addition and subtraction

Macros

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

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. More...
 
static mzd_poly_tmzd_poly_add (mzd_poly_t *C, const mzd_poly_t *A, const mzd_poly_t *B)
 C += (A+B) More...
 
static mzd_slice_t_mzd_slice_add (mzd_slice_t *C, const mzd_slice_t *A, const mzd_slice_t *B)
 \( C = A + B\). More...
 
static mzd_slice_tmzd_slice_add (mzd_slice_t *C, const mzd_slice_t *A, const mzd_slice_t *B)
 \( C = A + B\). More...
 
mzed_tmzed_add (mzed_t *C, const mzed_t *A, const mzed_t *B)
 \( C = A+B \). More...
 
mzed_t_mzed_add (mzed_t *C, const mzed_t *A, const mzed_t *B)
 \( C = A+B \). More...
 

Detailed Description

Macro Definition Documentation

#define _mzd_slice_sub   _mzd_slice_add

\( C = A + B\).

Parameters
CPreallocated sum matrix, may be NULL for automatic creation.
AMatrix
BMatrix
#define _mzed_sub   _mzed_add

\( C = A+B \).

Parameters
CPreallocated difference matrix, may be NULL for automatic creation.
AMatrix
BMatrix
#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
#define mzed_sub   mzed_add

\( C = A+B \).

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

Function Documentation

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.
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_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
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.
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_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