11#ifndef __Util_stat_ChiSquared_h
12#define __Util_stat_ChiSquared_h
14#include "BinaryStatistic.h"
16namespace BinaryStatistics
18 class ChiSquared :
public BinaryStatistic
20 bool robust_linear_fit;
21 double outlier_threshold;
22 double max_zap_fraction;
24 std::vector<double> residual;
32 void set_outlier_threshold (
double threshold) { outlier_threshold = threshold; }
35 double get (
const std::vector<double>&,
const std::vector<double>&);
38 const std::vector<double>& get_residual ()
const {
return residual; }
40 ChiSquared*
clone ()
const {
return new ChiSquared; }
virtual BinaryStatistic * clone() const =0
Derived types must also define clone method.