13 #include "msdevstudio/MSconfig.h"
25 using namespace hippodraw;
56 namespace dp = hippodraw::DataPoint2DTuple;
70 unsigned int rows =
m_ntuple -> rows ();
72 for (
unsigned int i = 0;
i < rows;
i++ ) {
74 const vector < double > & row =
m_ntuple -> getRow (
i );
76 double diff = function_value - row [ iy ];
77 result += diff * diff / (function_value + 10e-6);
82 unsigned int dimen = size - 2;
83 vector < double > coord ( dimen );
88 unsigned int rows =
m_ntuple -> rows ();
90 for (
unsigned int i = 0;
i < rows;
i++ ) {
92 const vector < double > & row =
m_ntuple -> getRow (
i );
94 double err = ie < 0 ? 0. : row [ ie ];
98 for (
unsigned int j = 0; j < dimen; j++ ) {
102 double diff = value - row [ iy ];
103 result += diff * diff / ( value * 10e-6 );
FunctionBase * m_function
The flags to indicated which parameters are to be held fixed during minimization of this object...
virtual double operator()(const std::vector< double > &parms) const
Sets the model function parameters to parms and returns the objective value.
A derived class of StatedFCN This class gets its data points from a DataSource.
bool m_has_errors
Error use flag.
virtual bool needsIntegrated() const
Returns true if data points were integrated.
std::vector< int > m_indices
The indexes into the DataSource.
hippodraw::DataSource class interface.
hippodraw::NTuplePearsonFCN class interface
virtual StatedFCN * clone() const
Makes a copy of the object.
intp size(numeric::array arr)
NTuplePearsonFCN()
The default constructor.
const DataSource * m_ntuple
The data source containing the data points for the fitter.
hippodraw::FunctionBase class interface
hippodraw::DataPointTuple namespace interface
A derived class for FCNBase class.
virtual double objectiveValue() const
Calculates and returns the Pearson's Chi-Squared.
bool acceptRow(unsigned int row) const
Returns true if the DataSource row row is within the fit Range.
A Pearson's Chi-squared functor class.