IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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
18IMPSAXS_BEGIN_NAMESPACE
19
20//! Parameters of a weighted fit, from WeightedProfileFitter.
21class WeightedFitParameters : public FitParameters {
22 public:
23 WeightedFitParameters() : FitParameters() {}
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
29 WeightedFitParameters(const FitParameters& fp) :
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
45IMPSAXS_END_NAMESPACE
46
47#endif /* IMPSAXS_WEIGHTED_FIT_PARAMETERS_H */
Copyright 2007-2022 IMP Inventors. All rights reserved.
A class for storing lists of IMP items.
A more IMP-like version of the std::vector.
Definition Vector.h:60