IMP logo
IMP Reference Guide  2.11.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-2019 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)
27  : FitParameters(chi_square, c1, c2), weights_(weights) {}
28 
29  const Vector<double>& get_weights() const { return weights_; }
30 
31  void set_weights(const Vector<double>& weights) { weights_ = weights; }
32 
33  void show(std::ostream& s) const {
34  s << "Chi^2 = " << chi_square_ << " c1 = " << c1_ << " c2 = " << c2_
35  << " default chi^2 = " << default_chi_square_ << std::endl;
36  }
37 
38  private:
39  Vector<double> weights_;
40 };
41 
42 IMPSAXS_END_NAMESPACE
43 
44 #endif /* IMPSAXS_WEIGHTED_FIT_PARAMETERS_H */
Parameters of a fit, from ProfileFitter.
Definition: FitParameters.h:16
Copyright 2007-2019 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.