GIRAFFE Pipeline Reference Manual

gimodels.h
1 /* $Id$
2  *
3  * This file is part of the GIRAFFE Pipeline
4  * Copyright (C) 2002-2006 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$
23  * $Date$
24  * $Revision$
25  * $Name$
26  */
27 
28 #ifndef GIMODELS_H
29 #define GIMODELS_H
30 
31 #include <cxtypes.h>
32 
33 #include <cpl_macros.h>
34 #include <cpl_propertylist.h>
35 
36 #include "gimodel.h"
37 #include "gilevenberg.h"
38 
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 
45 struct GiModel {
46 
47  cxchar* name;
48  GiModelType type;
49 
50  GiFitFunc model;
51 
52  struct {
53  cxint count;
54  cpl_propertylist* names;
55  cpl_matrix* values;
56  } arguments;
57 
58  struct {
59  cxint count;
60  cpl_propertylist* names;
61  cpl_matrix* values;
62  cpl_matrix* limits;
63  cxint* flags;
64  } parameters;
65 
66  struct {
67  GiFitSetup setup;
68 
69  cxint iterations;
70  cxint nfree;
71  cxint df;
72 
73  cxdouble chisq;
74  cxdouble rsquare;
75 
76  cpl_matrix* covariance;
77  } fit;
78 
79 };
80 
81 
82 typedef struct GiModelData GiModelData;
83 
84 struct GiModelData {
85 
86  const cxchar* const name;
87 
88  GiModelType type;
89 
90  void (*ctor)(GiModel* , const GiModelData* );
91  void (*dtor)(GiModel* );
92  GiFitFunc eval;
93 
94 };
95 
96 
97 extern const GiModelData* const giraffe_models;
98 
99 
100 #ifdef __cplusplus
101 }
102 #endif
103 
104 #endif /* GIMODELS_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:41 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004