gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
model_helpers.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
3 //
4 // Helper functions used in Model definitions
5 // and translation functions
6 //
7 // *********************************************
8 //
9 // Authors
10 // =======
11 //
12 // (add name and date if you modify)
13 //
14 // Ben Farmer
15 // 2014 Dec
16 //
17 // *********************************************
18 
19 #ifndef __model_helpers_hpp__
20 #define __model_helpers_hpp__
21 
22 #include <vector>
24 
25 namespace Gambit
26 {
27 
28  namespace Models
29  {
30 
31  // Set many string-named ModelParameters to a single value
32  inline void set_many_to_one(ModelParameters &myP, const std::vector<std::string>& v, const double value)
33  {
34  for(std::vector<std::string>::const_iterator it = v.begin(); it != v.end(); ++it)
35  {
36  myP.setValue(*it, value);
37  }
38  }
39 
40  }
41 
42 }
43 
44 #endif
45 
void set_many_to_one(ModelParameters &myP, const std::vector< std::string > &v, const double value)
void setValue(std::string const &inkey, double const &value)
Set single parameter value.
Class for holding model parameters.
TODO: see if we can use this one:
Definition: Analysis.hpp:33