Defines | |
#define | poly_deg(p) (vec_length(p) - 1) |
#define | poly_ediv(a, b, _q) lpoly_ediv(a, b, 0, _q) |
Typedefs | |
typedef vec ** | pmat |
typedef vec * | pvec |
Functions | |
static pmat | pmat_new (int W, int H) |
static void | pmat_delete (pmat m) |
static pvec | pvec_new (int N) |
static void | pvec_delete (pvec v) |
it_function_args (itf_polynomial) | |
void | poly_normalize (vec v) |
remove null factors from the polynomial | |
int | poly_is_null (vec v) |
static double | poly_eval (vec v, double x) |
void | poly_shift (vec v, int shift) |
vec | poly_add (vec a, vec b) |
vec | poly_sub (vec a, vec b) |
static vec | poly_mul (vec a, vec b) |
vec | lpoly_ediv (vec _a, vec _b, int deg_x, vec *_q) |
static vec | poly_div (vec a, vec b) |
static vec | poly_mod (vec a, vec b) |
vec | poly_gcd (vec a, vec b) |
vec | _lpoly_ediv (vec a, vec b, int deg_x, vec *_q) |
it_function (itf_polynomial) | |
Variables | |
it_function_t | itf_polynomial |
#define poly_deg | ( | p | ) | (vec_length(p) - 1) |
#define poly_ediv | ( | a, | |||
b, | |||||
_q | ) | lpoly_ediv(a, b, 0, _q) |
it_function | ( | itf_polynomial | ) |
it_function_args | ( | itf_polynomial | ) |
Definition at line 166 of file poly.c.
References _lpoly_ediv(), it_assert, poly_deg, poly_normalize(), vec_clone(), and vec_delete().
static void pmat_delete | ( | pmat | m | ) | [inline, static] |
static pmat pmat_new | ( | int | W, | |
int | H | |||
) | [inline, static] |
Definition at line 76 of file poly.c.
References poly_normalize(), vec_length(), and vec_set_length.
Referenced by main().
Definition at line 105 of file poly.h.
References poly_ediv, and vec_delete().
Referenced by main().
static double poly_eval | ( | vec | v, | |
double | x | |||
) | [inline, static] |
Definition at line 73 of file poly.h.
References it_function_args, and itf_polynomial.
Referenced by main().
Definition at line 187 of file poly.c.
References poly_is_null(), poly_mod(), poly_normalize(), vec_clone(), and vec_delete().
Referenced by main().
int poly_is_null | ( | vec | v | ) |
Definition at line 113 of file poly.h.
References poly_ediv, and vec_delete().
Referenced by main(), and poly_gcd().
void poly_normalize | ( | vec | v | ) |
remove null factors from the polynomial
e.g. 0 X^2 + X + 1 becomes X + 1
Definition at line 33 of file poly.c.
References vec_length(), and vec_set_length.
Referenced by lpoly_ediv(), poly_add(), poly_gcd(), and poly_sub().
void poly_shift | ( | vec | v, | |
int | shift | |||
) |
Definition at line 97 of file poly.c.
References poly_normalize(), vec_length(), and vec_set_length.
Referenced by main().
static void pvec_delete | ( | pvec | v | ) | [inline, static] |
static pvec pvec_new | ( | int | N | ) | [inline, static] |
Referenced by poly_eval().
|
|