15 #ifndef BORNAGAIN_CORE_FITTING_OBJECTIVEMETRICUTILS_H
16 #define BORNAGAIN_CORE_FITTING_OBJECTIVEMETRICUTILS_H
25 namespace ObjectiveMetricUtils
28 const std::function<double(
double)>
l1Norm();
30 const std::function<double(
double)>
l2Norm();
33 std::unique_ptr<ObjectiveMetric>
createMetric(
const std::string& metric);
36 std::unique_ptr<ObjectiveMetric>
createMetric(std::string metric, std::string norm);
const std::function< double(double)> l2Norm()
Returns L2 normalization function.
std::string defaultMetricName()
Returns default metric name.
std::string defaultNormName()
Returns default norm name.
std::string availableMetricOptions()
Prints available metric options.
std::unique_ptr< ObjectiveMetric > createMetric(const std::string &metric)
Creates the specified metric with the default norm.
std::vector< std::string > metricNames()
Returns the names of the objective metrics used.
const std::function< double(double)> l1Norm()
Returns L1 normalization function.
std::vector< std::string > normNames()
Returns the names of the norms used by ObjectiveMetric.
Base class for metric implementations.