16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_SIM_FITTING_OBJECTIVEMETRIC_H
21 #define BORNAGAIN_SIM_FITTING_OBJECTIVEMETRIC_H
50 virtual double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
51 std::vector<double> exp_stdv,
52 std::vector<double> weight_factors)
const = 0;
61 virtual double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
62 std::vector<double> weight_factors)
const = 0;
70 std::function<double(
double)>
m_norm;
90 double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
91 std::vector<double> exp_stdv,
92 std::vector<double> weight_factors)
const override;
101 double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
102 std::vector<double> weight_factors)
const override;
126 double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
127 std::vector<double> weight_factors)
const override;
148 double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
149 std::vector<double> exp_stdv,
150 std::vector<double> weight_factors)
const override;
159 double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
160 std::vector<double> weight_factors)
const override;
182 double computeFromArrays(std::vector<double> sim_data, std::vector<double> exp_data,
183 std::vector<double> weight_factors)
const override;
Defines and implements the standard mix-in ICloneable.
Implementation of the standard metric derived from maximum likelihood with Gaussian uncertainties....
double computeFromArrays(std::vector< double > sim_data, std::vector< double > exp_data, std::vector< double > exp_stdv, std::vector< double > weight_factors) const override
Computes metric value from data arrays. Negative values in exp_data are ignored as well as non-positi...
Chi2Metric * clone() const override
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Implementation of the standard metric with intensity and experimental data being replaced by and ...
double computeFromArrays(std::vector< double > sim_data, std::vector< double > exp_data, std::vector< double > exp_stdv, std::vector< double > weight_factors) const override
Computes metric value from data arrays. Negative values in exp_data are ignored as well as non-positi...
LogMetric * clone() const override
Base class for metric implementations.
virtual double compute(const SimDataPair &data_pair, bool use_weights) const
Computes metric value from SimDataPair object. Calls computeFromArrays internally.
virtual double computeFromArrays(std::vector< double > sim_data, std::vector< double > exp_data, std::vector< double > weight_factors) const =0
Computes metric value from data arrays. Negative values in exp_data are ignored as well as non-positi...
std::function< double(double)> m_norm
ObjectiveMetric * clone() const override=0
auto norm() const
Returns a copy of the normalization function used.
virtual double computeFromArrays(std::vector< double > sim_data, std::vector< double > exp_data, std::vector< double > exp_stdv, std::vector< double > weight_factors) const =0
Computes metric value from data arrays. Negative values in exp_data are ignored as well as non-positi...
ObjectiveMetric(std::function< double(double)> norm)
void setNorm(std::function< double(double)> norm)
Implementation of metric with standard deviation , where is the simulated intensity....
double computeFromArrays(std::vector< double > sim_data, std::vector< double > exp_data, std::vector< double > exp_stdv, std::vector< double > weight_factors) const override
Computes metric value from data arrays. Negative values in exp_data are ignored as well as non-positi...
PoissonLikeMetric * clone() const override
Implementation of relative difference metric. With default L2 norm and weighting off corresponds to t...
double compute(const SimDataPair &data_pair, bool use_weights) const override
Computes metric value from SimDataPair object. Calls computeFromArrays internally.
RQ4Metric * clone() const override
Holds pair of simulation/experimental data to fit.
Implementation of relative difference metric. With default L2 norm and weighting off corresponds to t...
double computeFromArrays(std::vector< double > sim_data, std::vector< double > exp_data, std::vector< double > exp_stdv, std::vector< double > weight_factors) const override
Computes metric value from data arrays. Negative values in exp_data are ignored as well as non-positi...
meanRelativeDifferenceMetric * clone() const override
meanRelativeDifferenceMetric()