BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Utility functions related to class ObjectiveMetric.
Functions | |
std::string | availableMetricOptions () |
Prints available metric options. More... | |
std::unique_ptr< ObjectiveMetric > | createMetric (const std::string &metric) |
Creates the specified metric with the default norm. More... | |
std::unique_ptr< ObjectiveMetric > | createMetric (std::string metric, std::string norm) |
Creates the metric with the specified norm. More... | |
std::string | defaultMetricName () |
Returns default metric name. More... | |
std::string | defaultNormName () |
Returns default norm name. More... | |
std::function< double(double)> | l1Norm () |
Returns L1 normalization function. More... | |
std::function< double(double)> | l2Norm () |
Returns L2 normalization function. More... | |
std::vector< std::string > | metricNames () |
Returns the names of the objective metrics used. More... | |
std::vector< std::string > | normNames () |
Returns the names of the norms used by ObjectiveMetric. More... | |
std::string ObjectiveMetricUtils::availableMetricOptions | ( | ) |
Prints available metric options.
Definition at line 86 of file ObjectiveMetricUtils.cpp.
References defaultMetricName(), defaultNormName(), metricNames(), and normNames().
Referenced by FitObjective::availableMetricOptions(), and createMetric().
std::unique_ptr< ObjectiveMetric > ObjectiveMetricUtils::createMetric | ( | const std::string & | metric | ) |
Creates the specified metric with the default norm.
Definition at line 61 of file ObjectiveMetricUtils.cpp.
References defaultNormName().
Referenced by FitObjective::setObjectiveMetric().
std::unique_ptr< ObjectiveMetric > ObjectiveMetricUtils::createMetric | ( | std::string | metric, |
std::string | norm | ||
) |
Creates the metric with the specified norm.
Definition at line 66 of file ObjectiveMetricUtils.cpp.
References availableMetricOptions().
std::string ObjectiveMetricUtils::defaultMetricName | ( | ) |
Returns default metric name.
Definition at line 115 of file ObjectiveMetricUtils.cpp.
Referenced by availableMetricOptions().
std::string ObjectiveMetricUtils::defaultNormName | ( | ) |
Returns default norm name.
Definition at line 110 of file ObjectiveMetricUtils.cpp.
Referenced by availableMetricOptions(), createMetric(), and FitObjective::setObjectiveMetric().
std::function< double(double)> ObjectiveMetricUtils::l1Norm | ( | ) |
Returns L1 normalization function.
Definition at line 51 of file ObjectiveMetricUtils.cpp.
std::function< double(double)> ObjectiveMetricUtils::l2Norm | ( | ) |
Returns L2 normalization function.
Definition at line 56 of file ObjectiveMetricUtils.cpp.
std::vector< std::string > ObjectiveMetricUtils::metricNames | ( | ) |
Returns the names of the objective metrics used.
Definition at line 105 of file ObjectiveMetricUtils.cpp.
Referenced by availableMetricOptions().
std::vector< std::string > ObjectiveMetricUtils::normNames | ( | ) |
Returns the names of the norms used by ObjectiveMetric.
Definition at line 100 of file ObjectiveMetricUtils.cpp.
Referenced by availableMetricOptions().