gimodels.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef GIMODELS_H
00029 #define GIMODELS_H
00030
00031 #include <cxtypes.h>
00032
00033 #include <cpl_macros.h>
00034 #include <cpl_propertylist.h>
00035
00036 #include "gimodel.h"
00037 #include "gilevenberg.h"
00038
00039
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043
00044
00045 struct GiModel {
00046
00047 cxchar* name;
00048 GiModelType type;
00049
00050 GiFitFunc model;
00051
00052 struct {
00053 cxint count;
00054 cpl_propertylist* names;
00055 cpl_matrix* values;
00056 } arguments;
00057
00058 struct {
00059 cxint count;
00060 cpl_propertylist* names;
00061 cpl_matrix* values;
00062 cpl_matrix* limits;
00063 cxint* flags;
00064 } parameters;
00065
00066 struct {
00067 GiFitSetup setup;
00068
00069 cxint iterations;
00070 cxint nfree;
00071 cxint df;
00072
00073 cxdouble chisq;
00074 cxdouble rsquare;
00075
00076 cpl_matrix* covariance;
00077 } fit;
00078
00079 };
00080
00081
00082 typedef struct GiModelData GiModelData;
00083
00084 struct GiModelData {
00085
00086 const cxchar* const name;
00087
00088 GiModelType type;
00089
00090 void (*ctor)(GiModel* , const GiModelData* );
00091 void (*dtor)(GiModel* );
00092 GiFitFunc eval;
00093
00094 };
00095
00096
00097 extern const GiModelData* const giraffe_models;
00098
00099
00100 #ifdef __cplusplus
00101 }
00102 #endif
00103
00104 #endif