2 #ifndef LSST_JOINTCAL_CHI2_H 3 #define LSST_JOINTCAL_CHI2_H 23 virtual void addEntry(
double inc,
unsigned dof, std::shared_ptr<BaseStar> star) = 0;
37 s <<
"chi2/ndof : " << chi2.
chi2 <<
'/' << chi2.
ndof <<
'=' << chi2.
chi2 / chi2.
ndof;
44 s <<
"Chi2/ndof : " << chi2 <<
'/' << ndof <<
'=' << chi2 / ndof;
49 void addEntry(
double inc,
unsigned dof, std::shared_ptr<BaseStar>)
override {
71 std::shared_ptr<BaseStar>
star;
73 Chi2Star(
double chi2, std::shared_ptr<BaseStar> star) : chi2(chi2), star(
std::move(star)) {}
78 s <<
"chi2: " << chi2Star.
chi2 <<
" star: " << *(chi2Star.
star) << std::endl;
86 void addEntry(
double chi2,
unsigned ndof, std::shared_ptr<BaseStar> star)
override {
87 this->push_back(
Chi2Star(chi2, std::move(star)));
91 std::pair<double, double> computeAverageAndSigma();
98 #endif // LSST_JOINTCAL_CHI2_H
Chi2Star(double chi2, std::shared_ptr< BaseStar > star)
Simple structure to accumulate chi2 and ndof.
friend std::ostream & operator<<(std::ostream &s, Chi2Statistic const &chi2)
Base class for Chi2Statistic and Chi2List, to allow addEntry inside Fitter for either class...
Chi2Statistic & operator+=(Chi2Statistic const &rhs)
void addEntry(double chi2, unsigned ndof, std::shared_ptr< BaseStar > star) override
std::string __str__()
this routine is the one called by the python print.
std::ostream & operator<<(std::ostream &stream, const Gtransfo >ransfo)
allows 'stream << Transfo;' (by calling gtransfo.dump(stream)).
friend std::ostream & operator<<(std::ostream &s, Chi2Star const &chi2Star)
Structure to accumulate the chi2 contributions per each star (to help find outliers).
virtual void addEntry(double inc, unsigned dof, std::shared_ptr< BaseStar > star)=0
Class for a simple mapping implementing a generic Gtransfo.
std::shared_ptr< BaseStar > star
void addEntry(double inc, unsigned dof, std::shared_ptr< BaseStar >) override
virtual ~Chi2Accumulator()
bool operator<(Chi2Star const &rhs) const