IMP logo
IMP Reference Guide  2.19.0
The Integrative Modeling Platform
WeightedFitParameters.h
Go to the documentation of this file.
1 /**
2  * \file IMP/saxs/WeightedFitParameters.h
3  *
4  * Copyright 2007-2022 IMP Inventors. All rights reserved.
5  *
6  */
7 
8 #ifndef IMPSAXS_WEIGHTED_FIT_PARAMETERS_H
9 #define IMPSAXS_WEIGHTED_FIT_PARAMETERS_H
10 
11 #include <IMP/saxs/saxs_config.h>
12 
13 #include "FitParameters.h"
14 #include <IMP/Vector.h>
15 
16 #include <iostream>
17 
18 IMPSAXS_BEGIN_NAMESPACE
19 
20 //! Parameters of a weighted fit, from WeightedProfileFitter.
22  public:
24 
25  WeightedFitParameters(double chi_square, double c1, double c2,
26  const Vector<double>& weights = Vector<double>())
27  : FitParameters(chi_square, c1, c2), weights_(weights) {}
28 
30  FitParameters(fp) {}
31 
32  const Vector<double>& get_weights() const { return weights_; }
33 
34  void set_weights(const Vector<double>& weights) { weights_ = weights; }
35 
36  void show(std::ostream& s) const {
37  s << "Chi^2 = " << chi_square_ << " c1 = " << c1_ << " c2 = " << c2_
38  << " default chi^2 = " << default_chi_square_ << std::endl;
39  }
40 
41  private:
42  Vector<double> weights_;
43 };
44 
45 IMPSAXS_END_NAMESPACE
46 
47 #endif /* IMPSAXS_WEIGHTED_FIT_PARAMETERS_H */
Parameters of a fit, from ProfileFitter.
Definition: FitParameters.h:16
Copyright 2007-2022 IMP Inventors. All rights reserved.
A class for storing lists of IMP items.
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
Parameters of a weighted fit, from WeightedProfileFitter.