![]() |
FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of a variable length array of arbitary precision complex numbers that are based on mpfr. More...
Go to the source code of this file.
Data Structures | |
| struct | array_struct |
| A variable length array of machine floating point complex numbers. More... | |
Macros | |
| #define | ARRAY_MIN_SIZE 100 |
| #define | ARRAY_SIZE_INCREASE 1.25 |
Typedefs | |
| typedef array_struct | array_t[1] |
Practical wrapper for array_struct. More... | |
| typedef array_struct * | array |
Convenience pointer to array_struct. | |
Functions | |
| array | array_new (ulong size) |
Returns a new empty array with memory size at least size. More... | |
| array | array_new_polyr (polyr P, prec_t prec) |
Returns the array of coefficients of the real polynomial P. More... | |
| array | array_new_poly (poly P, prec_t prec) |
Returns the array of coefficients of the polynomial P. More... | |
| bool | array_free (array l) |
Frees all the memory used by the array l, assuming the struct has been allocated with malloc(), for example with array_new(). More... | |
| bool | array_add (array l, comp z, prec_t prec) |
Adds the complex number z at the end of the array. The size of the array is automatically increased, if needed. More... | |
| comp_ptr | array_get (array l, ulong pos) |
Returns the pointer of the element on position pos in the array l. More... | |
| bool | array_is_real (array l) |
Checks if all complex numbers in the array l are real. More... | |
| long | array_first_inf (array l) |
Checks if there are infinite values in the list l. More... | |
| long | array_first_nan (array l) |
Checks if all complex numbers in the list l are well defined. More... | |
| polyr | array_polyr (array l, prec_t prec) |
Returns the real polynomial with the coefficients the real parts of the complex numbers in the array l. More... | |
| poly | array_poly (array l, prec_t prec) |
Returns the polynomial with the coefficients in the array l. More... | |
| bool | array_write (array l, char *fileName, int digits, bool verbose) |
Writes the array l to a CSV file with the given path fileName. More... | |
| bool | array_append (array l, char *fileName, int digits, bool verbose) |
Writes the array l to the end of a CSV file with the given path fileName. More... | |
| array | array_read (char *fileName, prec_t prec, bool verbose) |
Reads a array of complex numbers of precision prec from the CSV file with path fileName. More... | |
Definition of a variable length array of arbitary precision complex numbers that are based on mpfr.
Definition in file array.h.
| typedef array_struct array_t[1] |
Practical wrapper for array_struct.
To avoid the constant use * and & the type array_t is a pointer.
Writes the array l to the end of a CSV file with the given path fileName.
| l | the array |
| fileName | the path of the CSV file |
| digits | the number of digits after the decimal point of the numbers in the file |
| verbose | true to print information about the error, if any |
| long array_first_inf | ( | array | 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 array_first_nan | ( | array | 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 array l, assuming the struct has been allocated with malloc(), for example with array_new().
| l | the array |
Returns the pointer of the element on position pos in the array l.
| l | the array |
| pos | the position of the element |
pos in l, NULL if some error occurred. Returns a new empty array with memory size at least size.
| size | the number of elements to allocate memory for |
NULL if not enougn memory is available Returns the array of coefficients of the polynomial P.
| P | the polynomial |
| prec | the precision of the numbers in the array |
NULL if some error occurred. Returns the array of coefficients of the real polynomial P.
| P | the real polynomial |
| prec | the precision of the numbers in the array |
NULL if some error occurred. Returns the polynomial with the coefficients in the array l.
| l | the array |
| prec | the precision of the coefiicients of the polynomial |
NULL if some error occurred. Returns the real polynomial with the coefficients the real parts of the complex numbers in the array l.
| l | the array |
| prec | the precision of the coefiicients of the polynomial |
NULL if some coefficients are not real or some other error occurred. Reads a array of complex numbers of precision prec from the CSV file with path fileName.
| fileName | the path of the CSV file |
| prec | the precision |
| verbose | true to print information about the file and the error, if any |
NULL if some error occurred.