demo.hpp
Go to the documentation of this file.
53 // This is a model that everything else is connected through, but really does nothing -- kinda like Kevin Bacon. 65 // Gambit::Models::MODEL::<FUNCTION>). The MODEL_NAMESPACE macro gets you the Gambit::Models::MODEL 70 // Note that "myparams" must be const. You're not allowed to change them here. Change "parentparams". 72 // the correct namespace, and be defined after it has been declared using the INTERPRET_AS_PARENT macro. 73 // To make it easier to attach the function definition to the correct declaration, use the macro "MODEL_NAMESPACE". 74 void MODEL_NAMESPACE::kevin_bacon_IAPfunc (const ModelParameters &myparams, ModelParameters &parentparams) 76 logger()<<"Running interpret_as_parent calculations for kevin_bacon -> the_ancient_one ..."<<EOM; 99 // This creates a new module function with CAPABILITY = Mstop_obs, TYPE = double and MODULE = MODEL. 105 // Give the new interpret-as-parent function a dependency, a la regular GAMBIT module functions. 108 // Define the interpret-as-parent function. This can also be done in a source file if you prefer. 109 void MODEL_NAMESPACE::demo_A_IAPfunc (const ModelParameters &myparams, ModelParameters &parentparams) 141 // Alternative parameterisations of models are treated just like any other model. You may like to have 142 // a "primary" parameterisation, and "alternative" parameterisations which are child models of the 143 // primary, with interpret-as-parent functions defined to convert from the alternate to the primary parameters. 150 void MODEL_NAMESPACE::demo_A_alternative_IAPfunc (const ModelParameters &myparams, ModelParameters &parentparams) 168 // Make a second branch of the model tree, and connect it to the first branch using the INTERPRET_AS_X macro. 192 void MODEL_NAMESPACE::to_kevin_bacon(const ModelParameters &myparams, ModelParameters &kevin_bacon_params)
START_MODEL DEFINEPARS(mu, sigma) START_MODEL DEFINEPARS(x) START_MODEL DEFINEPARS(a const Logging::endofmessage EOM Explicit const instance of the end of message struct in Gambit namespace. Definition: logger.hpp:99 Logging::LogMaster & logger() Function to retrieve a reference to the Gambit global log object. Definition: logger.cpp:95 #define DEPENDENCY(DEP, TYPE) Indicate that the current FUNCTION depends on the presence of another module function that can supply... Definition: module_macros_incore.hpp:121 START_FUNCTION(unsigned int) ALLOW_MODELS(demo_CAP) DEPENDENCY(xsection #define START_CAPABILITY Registers the current CAPABILITY of the current MODULE. Definition: module_macros_incore.hpp:98 |