FORS Pipeline Reference Manual  4.12.5
fors_polynomial.h
1 /* $Id: fors_polynomial.h,v 1.5 2012-01-27 18:51:59 cgarcia Exp $
2  *
3  * This file is part of the FORS Library
4  * Copyright (C) 2002-2010 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author: cgarcia $
23  * $Date: 2012-01-27 18:51:59 $
24  * $Revision: 1.5 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef FORS_POLYNOMIAL_H
29 #define FORS_POLYNOMIAL_H
30 
31 #include <cpl.h>
32 
33 CPL_BEGIN_DECLS
34 
35 int
36 fors_polynomial_count_coeff( const cpl_polynomial *p);
37 
38 int
39 fors_polynomial_powers_find_first_coeff( const cpl_polynomial *p,
40  cpl_size *powers);
41 
42 int
43 fors_polynomial_powers_find_next_coeff( const cpl_polynomial *p,
44  cpl_size *powers);
45 
46 cpl_error_code
47 fors_polynomial_set_existing_coeff( cpl_polynomial *p,
48  const double *coeffs,
49  int n_coeffs);
50 
51 cpl_polynomial*
52 fors_polynomial_create_variance_polynomial( const cpl_polynomial *p_def,
53  const cpl_matrix *cov_coeff);
54 
55 cpl_error_code
56 fors_polynomial_dump( const cpl_polynomial *p,
57  const char *name,
58  cpl_msg_severity level,
59  const cpl_polynomial *p_def);
60 
61 char*
62 fors_polynomial_sprint_coeff( const cpl_polynomial *p,
63  cpl_size *powers,
64  const char *prefix);
65 
66 CPL_END_DECLS
67 
68 #endif /* FORS_POLYNOMIAL_H */
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.
CPL_BEGIN_DECLS int fors_polynomial_count_coeff(const cpl_polynomial *p)
Count the total number of non-zero coefficients.
char * fors_polynomial_sprint_coeff(const cpl_polynomial *p, cpl_size *powers, const char *prefix)
Print a coefficient's name into a newly allocated string.
int fors_polynomial_powers_find_next_coeff(const cpl_polynomial *p, cpl_size *powers)
Find the next non-zero coefficient.
int fors_polynomial_powers_find_first_coeff(const cpl_polynomial *p, cpl_size *powers)
Find the first 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 polyn...