M4RIE  0.20111004
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Data Structures | Functions
mzd_poly.h File Reference

Matrices over \(\mathbb{F}_2\)[x]. More...

#include <m4ri/m4ri.h>
#include "mzd_ptr.h"
#include "gf2x.h"
#include "blm.h"

Go to the source code of this file.

Data Structures

struct  mzd_poly_t
 will be the data type for matrices over \(\mathbb{F}_2\)[x] in the future 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_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_poly_t_mzd_poly_addmul_naive (mzd_poly_t *C, const mzd_poly_t *A, const mzd_poly_t *B)
 C += A*B using naive polynomial multiplication. More...
 
static mzd_poly_t_mzd_poly_addmul_karatsubs_balanced (mzd_poly_t *C, const mzd_poly_t *A, const mzd_poly_t *B)
 C += A*B using Karatsuba multiplication on balanced inputs. More...
 
static mzd_poly_t_mzd_poly_addmul_blm (mzd_poly_t *C, mzd_poly_t *A, mzd_poly_t *B, const blm_t *f)
 C += A*B by applying the bilinear maps f, i.e. f->H*((f->F*A) x (f->G*B)).
 
static mzd_poly_t_mzd_poly_addmul_crt (mzd_poly_t *C, mzd_poly_t *A, mzd_poly_t *B)
 C += A*B using the Chinese Remainder Theorem.
 
mzd_poly_t_mzd_poly_addmul_ext1 (mzd_poly_t *C, mzd_poly_t *A, mzd_poly_t *B)
 C += A*B using arithmetic in GF(2^log2(d)) if C has degree d.
 
static int mzd_poly_cmp (mzd_poly_t *A, mzd_poly_t *B)
 Return -1,0,1 if if A < B, A == B or A > B respectively. More...
 
static void mzd_poly_randomize (mzd_poly_t *A)
 Fill matrix A with random elements. More...
 

Detailed Description

Matrices over \(\mathbb{F}_2\)[x].

Warning
This code is experimental.

Function Documentation

static int mzd_poly_cmp ( mzd_poly_t A,
mzd_poly_t B 
)
inlinestatic

Return -1,0,1 if if A < B, A == B or A > B respectively.

Parameters
AMatrix.
BMatrix.
Note
This comparison is not well defined (except for !=0) mathematically and relatively arbitrary.