Gambit::Models::ModelFunctorClaw Class Reference Models object that performs initialisation and checking operations on a primary_model_functor list. More...
Collaboration diagram for Gambit::Models::ModelFunctorClaw:
![]()
Detailed DescriptionModels object that performs initialisation and checking operations on a primary_model_functor list. Definition at line 55 of file models.hpp. Member Typedef Documentation◆ LineageFunction
Function pointer type. Definition at line 61 of file models.hpp. Constructor & Destructor Documentation◆ ModelFunctorClaw()
◆ ~ModelFunctorClaw()
Destructor. Definition at line 82 of file models.hpp. References add_friend(), ancestor_of(), checkPrimaryModelFunctorUsage(), declare_model(), descended_from(), downstream_of(), get_activemodels(), get_allmodels(), get_best_friends(), get_descendants(), get_friends(), get_lineage(), get_parent(), getPrimaryModelFunctorsToActivate(), list_models(), model_exists(), upstream_of(), and verify_model().
Here is the call graph for this function:
![]() Member Function Documentation◆ add_friend()Add a friend, and all its friends and ancestors, to a model's list of friends. Definition at line 189 of file models.cpp. References Gambit::Models::PARENT::lineage, list_models(), LOCAL_INFO, Gambit::model_error(), model_exists(), myBestFriendsDB, myFriendsDB, and myLineageDB. Referenced by Gambit::copy_parameters(), and ~ModelFunctorClaw(). 201 std::set<str> temp1, temp2, lineage(myLineageDB[newfriend].begin(), myLineageDB[newfriend].end()); 202 set_union(myFriendsDB[model].begin(), myFriendsDB[model].end(), lineage.begin(), lineage.end(), inserter(temp1, temp1.begin())); 204 set_union(temp1.begin(), temp1.end(), myFriendsDB[newfriend].begin(), myFriendsDB[newfriend].end(), inserter(temp2, temp2.begin())); std::map< str, std::set< str > > myBestFriendsDB Definition: models.hpp:74 std::map< str, std::set< str > > myFriendsDB Definition: models.hpp:73 std::map< str, std::vector< str > > myLineageDB Definition: models.hpp:70 bool model_exists(const str &) const Indicate whether a model is recognised by GAMBIT or not. Definition: models.cpp:209
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ ancestor_of()Check if model 1 is an ancestor of model 2. Definition at line 280 of file models.cpp. References descended_from(). Referenced by ~ModelFunctorClaw(). bool descended_from(const str &, const str &) const Check if model 1 is descended from model 2. Definition: models.cpp:268
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ checkPrimaryModelFunctorUsage()
Active model functor "usefulness" checker. Checks that all the active primary model functors are actually used for something in the dependency tree. If not throws an error to warn the user. Definition at line 113 of file models.cpp. References LOCAL_INFO, Gambit::model_error(), and Gambit::functor::status(). Referenced by main(), and ~ModelFunctorClaw(). 141 for (std::vector<std::string>::iterator it = unusedmodels.begin(); it != unusedmodels.end(); ++it)
std::map< std::string, primary_model_functor * >::const_iterator activemodel_it Definition: models.cpp:41
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ declare_model()Add a new model to the model database. Definition at line 151 of file models.cpp. References allmodelnames, descended_from(), list_models(), LOCAL_INFO, Gambit::model_error(), model_exists(), myBestFriendsDB, myDescendantsDB, myFriendsDB, myLineageDB, and myParentsDB. Referenced by Gambit::add_model(), and ~ModelFunctorClaw(). 181 for (std::set<str>::iterator parent = allmodelnames.begin(); parent != allmodelnames.end(); ++parent) std::map< str, std::set< str > > myBestFriendsDB Definition: models.hpp:74 std::map< str, std::set< str > > myFriendsDB Definition: models.hpp:73 std::map< str, str > myParentsDB Definition: models.hpp:69 std::set< str > allmodelnames Definition: models.hpp:68 std::map< str, std::vector< str > > myLineageDB Definition: models.hpp:70 bool model_exists(const str &) const Indicate whether a model is recognised by GAMBIT or not. Definition: models.cpp:209 bool descended_from(const str &, const str &) const Check if model 1 is descended from model 2. Definition: models.cpp:268 std::map< str, std::vector< str > > myDescendantsDB Definition: models.hpp:71
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ descended_from()
Check if model 1 is descended from model 2. Definition at line 268 of file models.cpp. References Gambit::Models::PARENT::lineage, myLineageDB, and verify_model(). Referenced by ancestor_of(), declare_model(), downstream_of(), and ~ModelFunctorClaw(). void verify_model(const str &) const Verify that a string matches a model recognised by GAMBIT, crash otherwise. Definition: models.cpp:226 std::map< str, std::vector< str > > myLineageDB Definition: models.hpp:70
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ downstream_of()
Check if model 1 exists somewhere downstream of (and can be therefore be interpreted as a) model 2. Definition at line 286 of file models.cpp. References descended_from(), and myFriendsDB. Referenced by Gambit::functor::allowed_parent_or_friend_exists(), Gambit::functor::contains_anything_interpretable_as_member_of(), Gambit::functor::find_friend_or_parent_model_in_map(), Gambit::functor::in_allowed_combo(), Gambit::module_functor_common::notifyOfModel(), upstream_of(), and ~ModelFunctorClaw(). std::map< str, std::set< str > > myFriendsDB Definition: models.hpp:73 bool descended_from(const str &, const str &) const Check if model 1 is descended from model 2. Definition: models.cpp:268
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ get_activemodels()
Return the set of active models;. Retrieve the internally stored vector of activated models. Definition at line 106 of file models.cpp. References activemodels. Referenced by Gambit::DRes::DependencyResolver::closestCandidateForModel(), Gambit::DRes::DependencyResolver::makeFunctorsModelCompatible(), Gambit::DRes::DependencyResolver::resolveDependency(), Gambit::DRes::DependencyResolver::solveRequirement(), and ~ModelFunctorClaw().
Here is the caller graph for this function:
![]() ◆ get_allmodels()
Return set of all models recognised by GAMBIT. Definition at line 103 of file models.cpp. References allmodelnames. Referenced by ~ModelFunctorClaw(). std::set< str > allmodelnames Definition: models.hpp:68
Here is the caller graph for this function:
![]() ◆ get_best_friends()Retrieve the best friends for a given model. Definition at line 262 of file models.cpp. References myBestFriendsDB. Referenced by Gambit::ModelHierarchy::makeGraph(), and ~ModelFunctorClaw(). 264 return myBestFriendsDB.find(model) == myBestFriendsDB.end() ? std::set<str>() : myBestFriendsDB.at(model); std::map< str, std::set< str > > myBestFriendsDB Definition: models.hpp:74
Here is the caller graph for this function:
![]() ◆ get_descendants()Retrieve the descendants for a given model. Definition at line 238 of file models.cpp. References myDescendantsDB. Referenced by Gambit::gambit_core::check_databases(), and ~ModelFunctorClaw(). 240 return myDescendantsDB.find(model) == myDescendantsDB.end() ? std::vector<str>() : myDescendantsDB.at(model); std::map< str, std::vector< str > > myDescendantsDB Definition: models.hpp:71
Here is the caller graph for this function:
![]() ◆ get_friends()Retrieve the friends for a given model. Definition at line 256 of file models.cpp. References myFriendsDB. Referenced by ~ModelFunctorClaw(). std::map< str, std::set< str > > myFriendsDB Definition: models.hpp:73
Here is the caller graph for this function:
![]() ◆ get_lineage()Retrieve the lineage for a given model. Definition at line 250 of file models.cpp. References myLineageDB. Referenced by Gambit::gambit_core::check_databases(), and ~ModelFunctorClaw(). 252 return myLineageDB.find(model) == myLineageDB.end() ? std::vector<str>() : myLineageDB.at(model); std::map< str, std::vector< str > > myLineageDB Definition: models.hpp:70
Here is the caller graph for this function:
![]() ◆ get_parent()Retrieve the parent model for a given model. Retrieve the parents for a given model. Definition at line 244 of file models.cpp. References myParentsDB. Referenced by Gambit::gambit_core::check_databases(), Gambit::DRes::DependencyResolver::closestCandidateForModel(), Gambit::ModelHierarchy::makeGraph(), Gambit::gambit_core::model_diagnostic(), Gambit::DRes::DependencyResolver::resolveDependency(), Gambit::DRes::DependencyResolver::solveRequirement(), and ~ModelFunctorClaw(). std::map< str, str > myParentsDB Definition: models.hpp:69
Here is the caller graph for this function:
![]() ◆ getPrimaryModelFunctorsToActivate()
Model activation function. ModelFunctorClaw function definitions Models object the performs initialisation and checking operations on a primary_model_functor list. Returns a vector of primary_model_functors to be activated, according to the model(s) being scanned Model activation function Returns a vector of primary_model_functors to be activated, according to the model(s) being scanned Definition at line 52 of file models.cpp. References activemodels, LOCAL_INFO, and Gambit::model_error(). Referenced by ~ModelFunctorClaw(). std::vector< primary_model_functor * > primodel_vec Definition: models.hpp:50
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ list_models()
List all the models recognised by GAMBIT. Definition at line 215 of file models.cpp. References allmodelnames. Referenced by add_friend(), declare_model(), verify_model(), and ~ModelFunctorClaw(). std::set< str > allmodelnames Definition: models.hpp:68
Here is the caller graph for this function:
![]() ◆ model_exists()
Indicate whether a model is recognised by GAMBIT or not. Definition at line 209 of file models.cpp. References allmodelnames. Referenced by add_friend(), Gambit::functor::allowed_parent_or_friend_exists(), Gambit::functor::contains_anything_interpretable_as_member_of(), declare_model(), Gambit::functor::find_friend_or_parent_model_in_map(), Gambit::functor::in_allowed_combo(), Gambit::module_functor_common::module_functor_common(), Gambit::module_functor_common::notifyOfModel(), verify_model(), and ~ModelFunctorClaw(). std::set< str > allmodelnames Definition: models.hpp:68
Here is the caller graph for this function:
![]() ◆ upstream_of()Check if model 1 exists somewhere upstream of model 2, allowing model 2 to be interpreted as model 1. Definition at line 298 of file models.cpp. References downstream_of(). Referenced by ~ModelFunctorClaw(). bool downstream_of(const str &, const str &) const Check if model 1 exists somewhere downstream of (and can be therefore be interpreted as a) model 2... Definition: models.cpp:286
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() ◆ verify_model()Verify that a string matches a model recognised by GAMBIT, crash otherwise. Definition at line 226 of file models.cpp. References list_models(), LOCAL_INFO, Gambit::model_error(), and model_exists(). Referenced by descended_from(), and ~ModelFunctorClaw(). bool model_exists(const str &) const Indicate whether a model is recognised by GAMBIT or not. Definition: models.cpp:209
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() Member Data Documentation◆ activemodels
Internal record of the active models. Definition at line 64 of file models.hpp. Referenced by get_activemodels(), and getPrimaryModelFunctorsToActivate(). ◆ allmodelnames
Definition at line 68 of file models.hpp. Referenced by declare_model(), get_allmodels(), list_models(), and model_exists(). ◆ myBestFriendsDBDefinition at line 74 of file models.hpp. Referenced by add_friend(), declare_model(), and get_best_friends(). ◆ myDescendantsDBDefinition at line 71 of file models.hpp. Referenced by declare_model(), and get_descendants(). ◆ myFriendsDBDefinition at line 73 of file models.hpp. Referenced by add_friend(), declare_model(), downstream_of(), and get_friends(). ◆ myIsDescendantOfDB
Definition at line 72 of file models.hpp. ◆ myLineageDBDefinition at line 70 of file models.hpp. Referenced by add_friend(), declare_model(), descended_from(), and get_lineage(). ◆ myParentsDBDefinition at line 69 of file models.hpp. Referenced by declare_model(), and get_parent(). The documentation for this class was generated from the following files:
|