Data Structures | |
struct | bn_multipoly |
Files | |
file | multipoly.c |
Defines | |
#define | FAILSTR "failure in multipoly.c" |
#define | Max(a, b) (((a) > (b)) ? (a) : (b)) |
#define | Min(a, b) (((a) > (b)) ? (a) : (b)) |
Typedefs | |
typedef struct bn_multipoly | bn_multipoly_t |
Functions | |
struct bn_multipoly * | bn_multipoly_new (int dgrs, int dgrt) |
create new multipoly of a given size with coefficients set to 0 | |
struct bn_multipoly * | bn_multipoly_grow (register struct bn_multipoly *P, int dgrs, int dgrt) |
grow the cf array to be at least [dgrx][dgry], sets new entries to 0 | |
struct bn_multipoly * | bn_multipoly_set (register struct bn_multipoly *P, int s, int t, double val) |
set a coefficient growing cf array if needed | |
struct bn_multipoly * | bn_multpoly_add (register struct bn_multipoly *p1, register struct bn_multipoly *p2) |
add two polynomials | |
struct bn_multipoly * | bn_multipoly_mul (register struct bn_multipoly *p1, register struct bn_multipoly *p2) |
multiply two polynomials |
#define FAILSTR "failure in multipoly.c" |
Definition at line 39 of file multipoly.c.
Referenced by bn_multipoly_grow(), and bn_multipoly_new().
#define Max | ( | a, | |||
b | ) | (((a) > (b)) ? (a) : (b)) |
Definition at line 42 of file multipoly.c.
Referenced by bn_multipoly_grow(), and bn_multpoly_add().
#define Min | ( | a, | |||
b | ) | (((a) > (b)) ? (a) : (b)) |
Definition at line 43 of file multipoly.c.
typedef struct bn_multipoly bn_multipoly_t |
Polynomial data type
struct bn_multipoly* bn_multipoly_new | ( | int | dgrs, | |
int | dgrt | |||
) | [read] |
create new multipoly of a given size with coefficients set to 0
bn_multipoly_new
Definition at line 51 of file multipoly.c.
References bn_multipoly::cf, bn_multipoly::dgrs, bn_multipoly::dgrt, and FAILSTR.
Referenced by bn_multipoly_mul(), and bn_multpoly_add().
struct bn_multipoly* bn_multipoly_grow | ( | register struct bn_multipoly * | P, | |
int | dgrs, | |||
int | dgrt | |||
) | [read] |
grow the cf array to be at least [dgrx][dgry], sets new entries to 0
bn_multipoly_grow
Definition at line 78 of file multipoly.c.
References bn_multipoly::cf, bn_multipoly::dgrs, bn_multipoly::dgrt, FAILSTR, and Max.
Referenced by bn_multipoly_set().
struct bn_multipoly* bn_multipoly_set | ( | register struct bn_multipoly * | P, | |
int | s, | |||
int | t, | |||
double | val | |||
) | [read] |
set a coefficient growing cf array if needed
bn_multipoly_set
Definition at line 107 of file multipoly.c.
References bn_multipoly_grow(), and bn_multipoly::cf.
struct bn_multipoly* bn_multpoly_add | ( | register struct bn_multipoly * | p1, | |
register struct bn_multipoly * | p2 | |||
) | [read] |
add two polynomials
bn_multipoly_add
Definition at line 120 of file multipoly.c.
References bn_multipoly_new(), bn_multipoly::cf, bn_multipoly::dgrs, bn_multipoly::dgrt, and Max.
struct bn_multipoly* bn_multipoly_mul | ( | register struct bn_multipoly * | p1, | |
register struct bn_multipoly * | p2 | |||
) | [read] |
multiply two polynomials
bn_multipoly_mul
Definition at line 139 of file multipoly.c.
References bn_multipoly_new(), bn_multipoly::cf, bn_multipoly::dgrs, and bn_multipoly::dgrt.