00001
00012 #ifdef _MSC_VER
00013
00014 # pragma warning(disable:4231)
00015
00016
00017 # pragma warning(disable:4251)
00018
00019
00020 # pragma warning(disable:4275)
00021
00022
00023 # pragma warning(disable:4800)
00024 #endif
00025
00026
00027 #include "minimizers/StatedFCN.h"
00028
00029 #include "datasrcs/DataSource.h"
00030 #include "functions/FunctionBase.h"
00031
00032 #include <boost/python.hpp>
00033
00034
00035
00036 using std::vector;
00037
00038 using namespace boost::python;
00039
00040 namespace hippodraw {
00041 namespace Python {
00042
00043 void
00044 export_StatedFCN()
00045 {
00046 class_ < StatedFCN, bases < FCNBase >,
00047 StatedFCN, boost::noncopyable >
00048 ( "StatedFCN",
00049 "This a base class for objective function used in fitting that\n"
00050 "maintains the state of the function's parameters.",
00051 no_init )
00052
00053 .def ( "objectiveValue", &StatedFCN::objectiveValue,
00054 "objectiveValue () -> value\n"
00055 "\n"
00056 "Returns the objective value. For example, the objective\n"
00057 "might be the Chi-Squared when derived class returns it as\n"
00058 "its objective value." )
00059
00060 .def ( "setFunction", &StatedFCN::setFunction,
00061 "setFunction ( FunctionBase ) -> None\n"
00062 "\n"
00063 "Sets the model function." )
00064
00065 .def ( "setDataSource",
00066 ( void ( StatedFCN::* )
00067 (const DataSource * ) )
00068 &StatedFCN::setDataSource )
00069
00070 .def ( "setDataSource",
00071 ( void ( StatedFCN::* )
00072 ( const DataSource *,
00073 int dimension,
00074 const std::vector < int > & ) )
00075 &StatedFCN::setDataSource,
00076 "setDataSource ( DataSource ) -> None\n"
00077 "setDataSource ( DataSource, value, sequence ) -> None\n"
00078 "\n"
00079 "The first form sets the data source with default indexes. The\n"
00080 "second form takes in addition the dimensionality of the\n"
00081 "coordinate and a column indexes from the sequence." )
00082
00083 .def ( "setUseErrors", &StatedFCN::setUseErrors,
00084 "setUseErrors ( boolean ) -> None\n"
00085 "\n"
00086 "Sets the FCN to use errors on the data source if they exist." )
00087
00088 ;
00089 }
00090
00091 }
00092 }