ChiSquared.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2021 - 2024 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Util/stat/ChiSquared.h
10
11#ifndef __Util_stat_ChiSquared_h
12#define __Util_stat_ChiSquared_h
13
14#include "BinaryStatistic.h"
15
16namespace BinaryStatistics
17{
18 class ChiSquared : public BinaryStatistic
19 {
20 bool robust_linear_fit;
21 double outlier_threshold;
22 double max_zap_fraction;
23
24 std::vector<double> residual;
25
26 public:
27
29 ChiSquared ();
30
32 void set_outlier_threshold (double threshold) { outlier_threshold = threshold; }
33
35 double get (const std::vector<double>&, const std::vector<double>&);
36
38 const std::vector<double>& get_residual () const { return residual; }
39
40 ChiSquared* clone () const { return new ChiSquared; }
41 };
42}
43
44#endif
virtual BinaryStatistic * clone() const =0
Derived types must also define clone method.

Generated using doxygen 1.14.0