26 #define LIST_FACTOR 1.2
bool list_free(list l)
Frees all the memory used by the list l, assuming the struct has been allocated with malloc(),...
bool list_add(list l, deg_t k, real_t s)
Adds the couple (k,s) at a new position at the end of the list l.
bool list_trim(list l)
Trims the list l to minimal size to contain all its elements.
bool list_init(list l, deg_t size)
Initializes an existing list l with storage space for size numbers.
list_struct list_t[1]
Practical wrapper for list_struct.
list list_new(deg_t size)
Returns a new list of machine real numbers, with storage space for size numbers.
list list_clone(list l)
Returns a copy of the list l.
bool list_clear(list l)
Frees all the memory used by the list l, but not the list l itself.
bool list_sort(list l)
Sorts the list in descending order while preserving couples (k[i],s[i]) for all i.
list_struct * list
Convenience pointer to list_struct.
Definition of basic types.
double real_t
The machine number type to use for polynomial analysis and preconditionning.
ulong deg_t
The integer number type to use for polynomial degrees and indexes.
A list of real numbers that can be sorted, while keeping track of original order.
deg_t count
the number of elements
deg_t * k
indexes, powers, the permutation of the numbers when sorted
real_t * s
the list of numbers
deg_t size
the memory size allocated
bool sorted
the state of the list