gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
objective_plugin.hpp File Reference

Macros and related classes for declaring scanner test functions. More...

Include dependency graph for objective_plugin.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __OBJECTIVE_SETUP__
 
#define OBJECTIVE_PLUGIN(plug_name, ...)   GAMBIT_PLUGIN_INITIALIZE(__OBJECTIVE_SETUP__, plug_name, objective, __VA_ARGS__) \
 
Objective Plugin Macros

Macros used by the objective plugins.

Objective plugin declaration. Is of the form: objective_plugin(name, version)

#define objective_plugin(...)   OBJECTIVE_PLUGIN( __VA_ARGS__ )
 

Detailed Description

Macros and related classes for declaring scanner test functions.


Authors (add name and date if you modify):

Author
Gregory Martinez (grego.nosp@m.ry.d.nosp@m.avid..nosp@m.mart.nosp@m.inez@.nosp@m.gmai.nosp@m.l.com)
Date
2013 August 2014 Feb
Author
Pat Scott (p.sco.nosp@m.tt@i.nosp@m.mperi.nosp@m.al.a.nosp@m.c.uk)
Date
2014 Dec

Definition in file objective_plugin.hpp.

Macro Definition Documentation

◆ __OBJECTIVE_SETUP__

#define __OBJECTIVE_SETUP__
Value:
using namespace Gambit::Scanner; \
\
inline std::vector<std::string> &get_keys() {return get_input_value<std::vector<std::string>>(0);} \
inline void set_dimension(unsigned int val) {get_input_value<unsigned int>(1) = val;} \
inline void print_parameters(std::unordered_map<std::string, double> &key_map) \
{ \
Gambit::Scanner::printer *printer = get_printer().get_stream(); \
for (auto it = get_keys().begin(), end = get_keys().end(); it != end; ++it) \
{ \
printer->print(key_map[*it], *it, get_main_param_id(*it), printer->getRank(), get_point_id()); \
} \
} \
void print(T const &in, const std::string &label, const int vertexID, const uint rank, const ulong pointID)
EXPORT_SYMBOLS unsigned long long int & get_point_id()
Returns unigue pointid;.
EXPORT_SYMBOLS int get_main_param_id(const std::string &)
Returns unique positive parameter id; just a thin wrapper for get_param_id.
Printers::BaseBasePrinter printer
Type of the printer objects.

Definition at line 37 of file objective_plugin.hpp.

◆ objective_plugin

#define objective_plugin (   ...)    OBJECTIVE_PLUGIN( __VA_ARGS__ )

Definition at line 34 of file objective_plugin.hpp.

◆ OBJECTIVE_PLUGIN

#define OBJECTIVE_PLUGIN (   plug_name,
  ... 
)    GAMBIT_PLUGIN_INITIALIZE(__OBJECTIVE_SETUP__, plug_name, objective, __VA_ARGS__) \

Definition at line 53 of file objective_plugin.hpp.