GIRAFFE Pipeline Reference Manual

gimodels.h

00001 /* $Id: gimodels.h,v 1.8 2007/03/12 12:53:23 rpalsa Exp $
00002  *
00003  * This file is part of the GIRAFFE Pipeline
00004  * Copyright (C) 2002-2006 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 /*
00022  * $Author: rpalsa $
00023  * $Date: 2007/03/12 12:53:23 $
00024  * $Revision: 1.8 $
00025  * $Name: giraffe-2_10 $
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 /* GIMODELS_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.10.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Mar 7 14:11:02 2013 by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2004