Defines | |
#define | cleanup |
#define | cleanup |
#define | cleanup |
#define | cleanup |
#define | cleanup |
#define | cleanup |
#define | cleanup |
#define | cleanup |
#define | cleanup |
Functions | |
static bool | fors_polynomial_is_coeff_set (const cpl_polynomial *p, const int *powers) |
Implementation of the check whether a coefficient exists. | |
static bool | fors_polynomial_powers_next (const cpl_polynomial *p, int *powers) |
Step the powers of a polynomials coefficient to the next. | |
int | fors_polynomial_count_coeff (const cpl_polynomial *p) |
Count the total number of non-zero coefficients. | |
int | fors_polynomial_powers_find_first_coeff (const cpl_polynomial *p, int *powers) |
Find the first non-zero coefficient. | |
int | fors_polynomial_powers_find_next_coeff (const cpl_polynomial *p, int *powers) |
Find the next non-zero coefficient. | |
cpl_error_code | fors_polynomial_set_existing_coeff (cpl_polynomial *p, const double *coeffs, int n_coeffs) |
Set the already existing coefficients in a polynomial to values taken from an array. | |
cpl_polynomial * | fors_polynomial_create_variance_polynomial (const cpl_polynomial *p_def, const cpl_matrix *cov_coeff) |
Create a polynomial modelling the squared influence of the error of the coefficients of another polynomial. | |
cpl_error_code | fors_polynomial_dump (const cpl_polynomial *p, const char *name, cpl_msg_severity level, const cpl_polynomial *p_def) |
Count the total number of non-zero coefficients. | |
char * | fors_polynomial_sprint_coeff (const cpl_polynomial *p, int *powers, const char *prefix) |
Print a coefficient's name into a newly allocated string. |
#define cleanup |
Value:
do { \ if (pows != NULL) \ cpl_free(pows); \ pows = NULL; \ } while (0)
Definition at line 544 of file fors_polynomial.c.
#define cleanup |
Value:
do { \ if (pows != NULL) \ cpl_free(pows); \ pows = NULL; \ } while (0)
Definition at line 544 of file fors_polynomial.c.
#define cleanup |
Value:
do { \ if (powersA != NULL) { cpl_free(powersA); powersA = NULL;} \ if (powersB != NULL) { cpl_free(powersB); powersB = NULL;} \ if (powersE != NULL) { cpl_free(powersE); powersE = NULL;} \ cpl_polynomial_delete(ep); ep = NULL; \ } while (0)
Definition at line 544 of file fors_polynomial.c.
#define cleanup |
Value:
do { \ if (pows != NULL) \ cpl_free(pows); \ pows = NULL; \ if (ndxstr != NULL) \ cpl_free(ndxstr); \ ndxstr = NULL; \ } while (0)
Definition at line 544 of file fors_polynomial.c.
#define cleanup |
Value:
do { \ if (ndxstr != NULL) \ cpl_free(ndxstr); \ ndxstr = NULL; \ } while (0)
Definition at line 544 of file fors_polynomial.c.
static bool fors_polynomial_is_coeff_set | ( | const cpl_polynomial * | p, | |
const int * | powers | |||
) | [static] |
Implementation of the check whether a coefficient exists.
p | Polynomial | |
powers | Integer array (of the same dimension) containing the powers |
Definition at line 74 of file fors_polynomial.c.
Referenced by fors_polynomial_count_coeff(), fors_polynomial_dump(), fors_polynomial_powers_find_first_coeff(), and fors_polynomial_powers_find_next_coeff().
static bool fors_polynomial_powers_next | ( | const cpl_polynomial * | p, | |
int * | powers | |||
) | [static] |
Step the powers of a polynomials coefficient to the next.
p | Polynomial | |
powers | Integer array of the same dimensionality as p |
Definition at line 98 of file fors_polynomial.c.
Referenced by fors_polynomial_count_coeff(), and fors_polynomial_powers_find_next_coeff().
int fors_polynomial_count_coeff | ( | const cpl_polynomial * | p | ) |
Count the total number of non-zero coefficients.
p | Polynomial |
Definition at line 150 of file fors_polynomial.c.
References cleanup, fors_polynomial_is_coeff_set(), and fors_polynomial_powers_next().
Referenced by build_equations_lhs_matrix_from_poly(), fors_photometry_define_polyf(), fors_photometry_define_polyp(), fors_photometry_poly_new_from_coefficients(), and fors_polynomial_create_variance_polynomial().
int fors_polynomial_powers_find_first_coeff | ( | const cpl_polynomial * | p, | |
int * | powers | |||
) |
Find the first non-zero coefficient.
p | Polynomial | |
powers | Integer array (of the same dimension) containing the powers |
Definition at line 192 of file fors_polynomial.c.
References cleanup, fors_polynomial_is_coeff_set(), and fors_polynomial_powers_find_next_coeff().
Referenced by build_equations_lhs_matrix_from_poly(), fors_polynomial_create_variance_polynomial(), and fors_polynomial_set_existing_coeff().
int fors_polynomial_powers_find_next_coeff | ( | const cpl_polynomial * | p, | |
int * | powers | |||
) |
Find the next non-zero coefficient.
p | Polynomial | |
powers | Integer array (of the same dimension) containing the powers |
Definition at line 232 of file fors_polynomial.c.
References cleanup, fors_polynomial_is_coeff_set(), and fors_polynomial_powers_next().
Referenced by build_equations_lhs_matrix_from_poly(), fors_polynomial_create_variance_polynomial(), fors_polynomial_powers_find_first_coeff(), and fors_polynomial_set_existing_coeff().
cpl_error_code fors_polynomial_set_existing_coeff | ( | cpl_polynomial * | p, | |
const double * | coeffs, | |||
int | n_coeffs | |||
) |
Set the already existing coefficients in a polynomial to values taken from an array.
p | Polynomial | |
coeffs | Array containing coefficient values | |
n_coeffs | Size of coeffs array |
Definition at line 277 of file fors_polynomial.c.
References cleanup, fors_polynomial_powers_find_first_coeff(), and fors_polynomial_powers_find_next_coeff().
Referenced by fors_photometry_poly_new_from_coefficients().
cpl_polynomial* fors_polynomial_create_variance_polynomial | ( | const cpl_polynomial * | p_def, | |
const cpl_matrix * | cov_coeff | |||
) |
Create a polynomial modelling the squared influence of the error of the coefficients of another polynomial.
p_def | Polynomial definition (please read below) | |
cov_coeff | Covariance matrix of the coefficients |
Definition at line 356 of file fors_polynomial.c.
References cleanup, fors_polynomial_count_coeff(), fors_polynomial_powers_find_first_coeff(), and fors_polynomial_powers_find_next_coeff().
Referenced by fors_photometry_poly_new_from_coefficients().
cpl_error_code fors_polynomial_dump | ( | const cpl_polynomial * | p, | |
const char * | name, | |||
cpl_msg_severity | level, | |||
const cpl_polynomial * | p_def | |||
) |
Count the total number of non-zero coefficients.
p | Polynomial | |
name | (Optional) name, can be NULL | |
level | Message level | |
p_def | (Optional) polynomial definition, used to determine non-zero coefficients |
Definition at line 465 of file fors_polynomial.c.
References cleanup, and fors_polynomial_is_coeff_set().
Referenced by fors_photometry(), fors_photometry_define_polyf(), and fors_photometry_define_polyp().
char* fors_polynomial_sprint_coeff | ( | const cpl_polynomial * | p, | |
int * | powers, | |||
const char * | prefix | |||
) |
Print a coefficient's name into a newly allocated string.
p | Polynomial | |
powers | Integer array (of the same dimension) containing the powers | |
name | (Optional) name prefix, can be NULL |
Definition at line 563 of file fors_polynomial.c.
Referenced by build_equations_lhs_matrix_from_poly().