Public Member Functions |
Protected Member Functions |
Private Attributes |
Friends |
List of all members
Gambit::ModelParameters Class Reference
Collaboration diagram for Gambit::ModelParameters:
![]()
Detailed DescriptionDefinition at line 53 of file model_parameters.hpp. Constructor & Destructor Documentation◆ ModelParameters() [1/3]
Default constructor. Definition at line 52 of file model_parameters.cpp. std::string outputname Output name (string used for labelling in output, related to the model_functor which produced these p... Definition: model_parameters.hpp:144 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137 std::string modelname Name of the model; intended mainly for more helpful error messages. Definition: model_parameters.hpp:140 ◆ ModelParameters() [2/3]
Constructor using vector of strings. Definition at line 55 of file model_parameters.cpp. References _definePars(). std::string outputname Output name (string used for labelling in output, related to the model_functor which produced these p... Definition: model_parameters.hpp:144 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137 std::string modelname Name of the model; intended mainly for more helpful error messages. Definition: model_parameters.hpp:140 void _definePars(const std::vector< std::string > &v) Define many new parameters at once via a vector of names. Definition: model_parameters.cpp:171
Here is the call graph for this function:
![]() ◆ ModelParameters() [3/3]
Constructor using array of char arrays. Definition at line 61 of file model_parameters.cpp. References _definePars(). std::string outputname Output name (string used for labelling in output, related to the model_functor which produced these p... Definition: model_parameters.hpp:144 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137 std::string modelname Name of the model; intended mainly for more helpful error messages. Definition: model_parameters.hpp:140 void _definePars(const std::vector< std::string > &v) Define many new parameters at once via a vector of names. Definition: model_parameters.cpp:171
Here is the call graph for this function:
![]() Member Function Documentation◆ _definePar()
Define a parameter with name, value (i.e. add to internal map). Value is initialised to zero. Definition at line 165 of file model_parameters.cpp. References _values. Referenced by _definePars(), and Gambit::model_functor::addParameter(). std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the caller graph for this function:
![]() ◆ _definePars() [1/2]
Define many new parameters at once via a vector of names. Definition at line 171 of file model_parameters.cpp. References _definePar(). Referenced by ModelParameters(). void _definePar(const std::string &newkey) Define a parameter with name, value (i.e. add to internal map). Value is initialised to zero... Definition: model_parameters.cpp:165
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ _definePars() [2/2]
Define many new parameters at once via an array of char arrays. Definition at line 180 of file model_parameters.cpp. References _definePar(). void _definePar(const std::string &newkey) Define a parameter with name, value (i.e. add to internal map). Value is initialised to zero... Definition: model_parameters.cpp:165
Here is the call graph for this function:
![]() ◆ assert_contains()
Checks if this model container holds a parameter match the supplied name. ModelParameters class member function definitions. Checks if this model container holds a parameter matching the supplied name Definition at line 43 of file model_parameters.cpp. References _values, getModelName(), LOCAL_INFO, and Gambit::model_error(). Referenced by at(), getValue(), operator[](), setValue(), and setValues(). 47 model_error().raise(LOCAL_INFO, "ModelParameters object (with name "+getModelName()+") does not contain the requested parameter '"+inkey+"'.");
std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137 std::string getModelName() const Getters/setters for model and output names. Definition: model_parameters.cpp:191
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ at()
Get parameter value using 'at' syntax. Get parameter value using 'at' operator This is no different to the bracket operator method, since keys cannot be added with the bracket method anyhow, but for people who are used to maps it is nice to have. Definition at line 108 of file model_parameters.cpp. References _values, and assert_contains(). void assert_contains(std::string) const Checks if this model container holds a parameter match the supplied name. Definition: model_parameters.cpp:43 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the call graph for this function:
![]() ◆ begin()
Get a const iterator to the first parameter map entry. Definition at line 80 of file model_parameters.cpp. References getValues(). Referenced by Gambit::model_functor::donateParameters(). const std::map< std::string, double > & getValues() const Get values of all parameters. Definition: model_parameters.cpp:74
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ end()
Get a const iterator to the last parameter map entry. Definition at line 86 of file model_parameters.cpp. References getValues(). Referenced by Gambit::model_functor::donateParameters(). const std::map< std::string, double > & getValues() const Get values of all parameters. Definition: model_parameters.cpp:74
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ getKeys()
Get parameter keys (names), probably for external iteration. Definition at line 144 of file model_parameters.cpp. References _values. Referenced by Gambit::PostProcessor::PPDriver::get_ModelParameters(), main(), and Gambit::PostProcessor::PPDriver::run_main_loop(). std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the caller graph for this function:
![]() ◆ getModelName()
Getters/setters for model and output names. Definition at line 191 of file model_parameters.cpp. References modelname. Referenced by assert_contains(), and Gambit::model_functor::donateParameters(). std::string modelname Name of the model; intended mainly for more helpful error messages. Definition: model_parameters.hpp:140
Here is the caller graph for this function:
![]() ◆ getNumberOfPars()
Get number of parameters stored in this object. Definition at line 92 of file model_parameters.cpp. References _values. std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137 ◆ getOutputName()
Definition at line 192 of file model_parameters.cpp. References outputname. Referenced by Gambit::PostProcessor::PPDriver::run_main_loop(). std::string outputname Output name (string used for labelling in output, related to the model_functor which produced these p... Definition: model_parameters.hpp:144
Here is the caller graph for this function:
![]() ◆ getValue()
Get value of named parameter. Definition at line 67 of file model_parameters.cpp. References _values, and assert_contains(). void assert_contains(std::string) const Checks if this model container holds a parameter match the supplied name. Definition: model_parameters.cpp:43 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the call graph for this function:
![]() ◆ getValues()
Get values of all parameters. Definition at line 74 of file model_parameters.cpp. References _values. Referenced by Gambit::Printers::_common_print(), begin(), end(), and setValues(). std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the caller graph for this function:
![]() ◆ operator[]()
Get parameter value using bracket operator. Definition at line 98 of file model_parameters.cpp. References _values, and assert_contains(). void assert_contains(std::string) const Checks if this model container holds a parameter match the supplied name. Definition: model_parameters.cpp:43 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the call graph for this function:
![]() ◆ print()
Dump parameter names and values to stdout (should be for debugging only) Definition at line 155 of file model_parameters.cpp. References _values. std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137 ◆ setModelName()
Definition at line 193 of file model_parameters.cpp. References modelname. Referenced by Gambit::model_functor::setModelName(). std::string modelname Name of the model; intended mainly for more helpful error messages. Definition: model_parameters.hpp:140
Here is the caller graph for this function:
![]() ◆ setOutputName()
Definition at line 194 of file model_parameters.cpp. References outputname. std::string outputname Output name (string used for labelling in output, related to the model_functor which produced these p... Definition: model_parameters.hpp:144 ◆ setValue()Set single parameter value. Definition at line 116 of file model_parameters.cpp. References _values, and assert_contains(). Referenced by main(), Gambit::MSSM20atX_to_MSSM25atX(), Gambit::MSSM25atX_to_MSSM30atX(), Gambit::MSSM30atX_to_MSSM63atX(), Gambit::MSSM_mA_to_MSSM_mhud(), Gambit::MSSMatX_to_MSSMatQ(), and Gambit::Models::set_many_to_one(). void assert_contains(std::string) const Checks if this model container holds a parameter match the supplied name. Definition: model_parameters.cpp:43 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ setValues() [1/2]
Set many parameter values using a map. Definition at line 129 of file model_parameters.cpp. References _values, and assert_contains(). Referenced by Gambit::MSSM20atX_to_MSSM25atX(), Gambit::MSSM25atX_to_MSSM30atX(), Gambit::MSSM30atX_to_MSSM63atX(), Gambit::MSSM_mA_to_MSSM_mhud(), Gambit::MSSMatX_to_MSSMatQ(), and setValues(). void assert_contains(std::string) const Checks if this model container holds a parameter match the supplied name. Definition: model_parameters.cpp:43 std::map< std::string, double > _values Internal map representation of parameters and their values. Definition: model_parameters.hpp:137
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ setValues() [2/2]
Set many parameter values using another ModelParameters object. Definition at line 123 of file model_parameters.cpp. References getValues(), and setValues(). void setValues(std::map< std::string, double > const ¶ms_map, bool missing_is_error=true) Set many parameter values using a map. Definition: model_parameters.cpp:129
Here is the call graph for this function:
![]() Friends And Related Function Documentation◆ operator<<
Dump parameter names and values to stream (again for debugging only I think) Definition at line 109 of file model_parameters.hpp. Member Data Documentation◆ _values
Internal map representation of parameters and their values. Definition at line 137 of file model_parameters.hpp. Referenced by _definePar(), assert_contains(), at(), getKeys(), getNumberOfPars(), getValue(), getValues(), operator[](), print(), setValue(), and setValues(). ◆ modelname
Name of the model; intended mainly for more helpful error messages. Definition at line 140 of file model_parameters.hpp. Referenced by getModelName(), and setModelName(). ◆ outputname
Output name (string used for labelling in output, related to the model_functor which produced these parameters) Currently used only by the postprocessor ScannerBit plugin and reader plugins. Definition at line 144 of file model_parameters.hpp. Referenced by getOutputName(), and setOutputName(). The documentation for this class was generated from the following files:
|