FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of a variable length array of machine floating point complex numbers. More...
Go to the source code of this file.
Data Structures | |
struct | arrayf_struct |
A variable length list of machine floating point complex numbers. More... | |
Macros | |
#define | LISTF_MIN_SIZE 100 |
#define | LISTF_SIZE_INCREASE 1.25 |
Typedefs | |
typedef arrayf_struct | arrayf_t[1] |
Practical wrapper for arrayf_struct . More... | |
typedef arrayf_struct * | arrayf |
Convenience pointer to arrayf_struct . | |
Functions | |
arrayf | arrayf_new (ulong size) |
Returns a new empty list with memory size at least size . More... | |
arrayf | arrayf_new_polyfr (polyfr P) |
Returns the list of coefficients of the real polynomial P . More... | |
arrayf | arrayf_new_polyf (polyf P) |
Returns the list of coefficients of the polynomial P . More... | |
bool | arrayf_free (arrayf l) |
Frees all the memory used by the list l , assuming the struct has been allocated with malloc() , for example with list_new() . More... | |
bool | arrayf_add (arrayf l, compf z) |
Adds the complex number z at the end of the list. The size of the list is automatically increased, if needed. More... | |
compf_ptr | arrayf_get (arrayf l, ulong pos) |
Returns the pointer of the element on position pos in the list l . More... | |
bool | arrayf_is_real (arrayf l) |
Checks if all complex numbers in the list l are real. More... | |
long | arrayf_first_inf (arrayf l) |
Checks if there are infinite values in the list l . More... | |
long | arrayf_first_nan (arrayf l) |
Checks if all complex numbers in the list l are well defined. More... | |
polyfr | arrayf_polyfr (arrayf l) |
Returns the real polynomial with the coefficients the real parts of the complex numbers in the list l . More... | |
polyf | arrayf_polyf (arrayf l) |
Returns the polynomial with the coefficients in the list l . More... | |
bool | arrayf_write (arrayf l, char *fileName, bool verbose) |
Writes the list l to a CSV file with the given path fileName . More... | |
bool | arrayf_append (arrayf l, char *fileName, bool verbose) |
Writes the list l to the end of a CSV file with the given path fileName . More... | |
arrayf | arrayf_read (char *fileName, bool verbose) |
Reads a list of complex numbers from the CSV file with path fileName . More... | |
Definition of a variable length array of machine floating point complex numbers.
Definition in file arrayf.h.
typedef arrayf_struct arrayf_t[1] |
Practical wrapper for arrayf_struct
.
To avoid the constant use *
and &
the type arrayf_t
is a pointer.
long arrayf_first_inf | ( | arrayf | l | ) |
Checks if there are infinite values in the list l
.
l | the list |
l
, -1
if there is none, LONG_MAX if some error occurred. long arrayf_first_nan | ( | arrayf | l | ) |
Checks if all complex numbers in the list l
are well defined.
l | the list |
l
, -1
if there is none, LONG_MAX if some error occurred. Frees all the memory used by the list l
, assuming the struct has been allocated with malloc()
, for example with list_new()
.
l | the list |
Returns the pointer of the element on position pos
in the list l
.
l | the list |
pos | the position of the element |
pos
in l
, NULL
if some error occurred. Returns a new empty list with memory size at least size
.
size | the number of elements to allocate memory for |
NULL
if not enougn memory is available Returns the list of coefficients of the polynomial P
.
P | the polynomial |
NULL
if some error occurred. Returns the list of coefficients of the real polynomial P
.
P | the real polynomial |
NULL
if some error occurred. Returns the polynomial with the coefficients in the list l
.
l | the list |
NULL
if some error occurred. Returns the real polynomial with the coefficients the real parts of the complex numbers in the list l
.
l | the list |
NULL
if some coefficients are not real or some other error occurred. Reads a list of complex numbers from the CSV file with path fileName
.
fileName | the path of the CSV file |
verbose | true to print information about the file and the error, if any |
NULL
if some error occurred.