BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Utility functions related to class ObjectiveMetric. More...
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... | |
const std::function< double(double)> | l1Norm () |
Returns L1 normalization function. More... | |
const 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... | |
Utility functions related to class ObjectiveMetric.
std::string ObjectiveMetricUtils::availableMetricOptions | ( | ) |
Prints available metric options.
Definition at line 83 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 58 of file ObjectiveMetricUtils.cpp.
References defaultNormName().
Referenced by MinimizerContainerItem::createMetric(), and FitObjective::setObjectiveMetric().
std::unique_ptr< ObjectiveMetric > ObjectiveMetricUtils::createMetric | ( | std::string | metric, |
std::string | norm | ||
) |
Creates the metric with the specified norm.
Definition at line 63 of file ObjectiveMetricUtils.cpp.
References availableMetricOptions().
std::string ObjectiveMetricUtils::defaultMetricName | ( | ) |
Returns default metric name.
Definition at line 112 of file ObjectiveMetricUtils.cpp.
Referenced by MinimizerContainerItem::MinimizerContainerItem(), and availableMetricOptions().
std::string ObjectiveMetricUtils::defaultNormName | ( | ) |
Returns default norm name.
Definition at line 107 of file ObjectiveMetricUtils.cpp.
Referenced by MinimizerContainerItem::MinimizerContainerItem(), availableMetricOptions(), createMetric(), and FitObjective::setObjectiveMetric().
const std::function< double(double)> ObjectiveMetricUtils::l1Norm | ( | ) |
Returns L1 normalization function.
Definition at line 48 of file ObjectiveMetricUtils.cpp.
const std::function< double(double)> ObjectiveMetricUtils::l2Norm | ( | ) |
Returns L2 normalization function.
Definition at line 53 of file ObjectiveMetricUtils.cpp.
std::vector< std::string > ObjectiveMetricUtils::metricNames | ( | ) |
Returns the names of the objective metrics used.
Definition at line 102 of file ObjectiveMetricUtils.cpp.
Referenced by MinimizerContainerItem::MinimizerContainerItem(), and availableMetricOptions().
std::vector< std::string > ObjectiveMetricUtils::normNames | ( | ) |
Returns the names of the norms used by ObjectiveMetric.
Definition at line 97 of file ObjectiveMetricUtils.cpp.
Referenced by MinimizerContainerItem::MinimizerContainerItem(), and availableMetricOptions().