BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MinimizerItemCatalog Class Reference

The MinimizerItemCatalog class is a static class to provide MinimizerItem with the list of available minimizers/algorithms. More...

Static Public Member Functions

static ComboProperty algorithmCombo (const QString &minimizerType)
 Returns ComboProperty representing list of algorithms defined for given minimizerType. More...
 

Static Private Member Functions

static QStringList algorithmDescriptions (const QString &minimizerType)
 Returns list of algoritm descriptions defined for given minimizer. More...
 
static QStringList algorithmNames (const QString &minimizerType)
 Returns list of algorithm names defined for given minimizer. More...
 

Detailed Description

The MinimizerItemCatalog class is a static class to provide MinimizerItem with the list of available minimizers/algorithms.

Definition at line 25 of file MinimizerItemCatalog.h.

Member Function Documentation

◆ algorithmCombo()

ComboProperty MinimizerItemCatalog::algorithmCombo ( const QString &  minimizerType)
static

Returns ComboProperty representing list of algorithms defined for given minimizerType.

Definition at line 21 of file MinimizerItemCatalog.cpp.

22 {
23  ComboProperty result = ComboProperty() << algorithmNames(minimizerType);
24  result.setToolTips(algorithmDescriptions(minimizerType));
25  return result;
26 }
Custom property to define list of string values with multiple selections.
Definition: ComboProperty.h:25
void setToolTips(const QStringList &tooltips)
static QStringList algorithmNames(const QString &minimizerType)
Returns list of algorithm names defined for given minimizer.
static QStringList algorithmDescriptions(const QString &minimizerType)
Returns list of algoritm descriptions defined for given minimizer.

References algorithmDescriptions(), algorithmNames(), and ComboProperty::setToolTips().

Referenced by GSLMultiMinimizerItem::GSLMultiMinimizerItem(), and MinuitMinimizerItem::MinuitMinimizerItem().

Here is the call graph for this function:

◆ algorithmDescriptions()

QStringList MinimizerItemCatalog::algorithmDescriptions ( const QString &  minimizerType)
staticprivate

Returns list of algoritm descriptions defined for given minimizer.

Definition at line 39 of file MinimizerItemCatalog.cpp.

40 {
41  std::vector<std::string> descr =
42  MinimizerFactory::catalog().algorithmDescriptions(minimizerType.toStdString());
43  return GUIHelpers::fromStdStrings(descr);
44 }
std::vector< std::string > algorithmDescriptions(const std::string &minimizerName) const
Returns list of algorithm's descriptions for the minimizer with a given name .
static const MinimizerCatalog & catalog()
QStringList fromStdStrings(const std::vector< std::string > &container)
Definition: GUIHelpers.cpp:233

References MinimizerCatalog::algorithmDescriptions(), MinimizerFactory::catalog(), and GUIHelpers::fromStdStrings().

Referenced by algorithmCombo().

Here is the call graph for this function:

◆ algorithmNames()

QStringList MinimizerItemCatalog::algorithmNames ( const QString &  minimizerType)
staticprivate

Returns list of algorithm names defined for given minimizer.

Definition at line 30 of file MinimizerItemCatalog.cpp.

31 {
32  std::vector<std::string> algos =
33  MinimizerFactory::catalog().algorithmNames(minimizerType.toStdString());
34  return GUIHelpers::fromStdStrings(algos);
35 }
std::vector< std::string > algorithmNames(const std::string &minimizerName) const
Returns list of algorithms defined for the minimizer with a given name.

References MinimizerCatalog::algorithmNames(), MinimizerFactory::catalog(), and GUIHelpers::fromStdStrings().

Referenced by algorithmCombo().

Here is the call graph for this function:

The documentation for this class was generated from the following files: