gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
Gambit::Scanner::like_ptr Class Reference

likelihood container for scanner plugins. More...

#include <factory_defs.hpp>

Inheritance diagram for Gambit::Scanner::like_ptr:
Collaboration diagram for Gambit::Scanner::like_ptr:

Public Member Functions

 like_ptr ()
 
 like_ptr (const like_ptr &in)
 
 like_ptr (void *in)
 
double operator() (const std::vector< double > &vec)
 
double operator() (std::unordered_map< std::string, double > &map, const std::vector< double > &vec=std::vector< double >())
 

Private Types

typedef scan_ptr< double(std::unordered_map< std::string, double > &)> s_ptr
 

Private Attributes

std::unordered_map< std::string, doublemap
 

Detailed Description

likelihood container for scanner plugins.

Definition at line 311 of file factory_defs.hpp.

Member Typedef Documentation

◆ s_ptr

typedef scan_ptr<double (std::unordered_map<std::string, double> &)> Gambit::Scanner::like_ptr::s_ptr
private

Definition at line 314 of file factory_defs.hpp.

Constructor & Destructor Documentation

◆ like_ptr() [1/3]

Gambit::Scanner::like_ptr::like_ptr ( )
inline

Definition at line 318 of file factory_defs.hpp.

318 {}

◆ like_ptr() [2/3]

Gambit::Scanner::like_ptr::like_ptr ( const like_ptr in)
inline

Definition at line 319 of file factory_defs.hpp.

319 : s_ptr (in){}
scan_ptr< double(std::unordered_map< std::string, double > &)> s_ptr

◆ like_ptr() [3/3]

Gambit::Scanner::like_ptr::like_ptr ( void in)
inline

Definition at line 321 of file factory_defs.hpp.

321 : s_ptr(in) {}
scan_ptr< double(std::unordered_map< std::string, double > &)> s_ptr

Member Function Documentation

◆ operator()() [1/2]

double Gambit::Scanner::like_ptr::operator() ( const std::vector< double > &  vec)
inline

Definition at line 323 of file factory_defs.hpp.

References Gambit::Printers::get_point_id(), and combine_hdf5::rank.

324  {
325  int rank = (*this)->getRank();
326  (*this)->getPrior().transform(vec, map);
327  double ret_val = (*this)->operator()(map);
328  unsigned long long int id = Gambit::Printers::get_point_id();
329  (*this)->getPrinter().print(ret_val, (*this)->getPurpose(), rank, id);
330  if (vec.size() > 0 && (*this)->getPrinter().get_printUnitcube())
331  (*this)->getPrinter().print(vec, "unitCubeParameters", rank, id);
332  (*this)->getPrinter().print(id, "pointID", rank, id);
333  (*this)->getPrinter().print(rank, "MPIrank", rank, id);
334  (*this)->getPrinter().enable(); // Make sure printer is re-enabled (might have been disabled by invalid point error)
335 
336  return ret_val + (*this)->getPurposeOffset();
337  }
EXPORT_SYMBOLS unsigned long long int & get_point_id()
Returns unigue pointid;.
std::unordered_map< std::string, double > map
Here is the call graph for this function:

◆ operator()() [2/2]

double Gambit::Scanner::like_ptr::operator() ( std::unordered_map< std::string, double > &  map,
const std::vector< double > &  vec = std::vector<double>() 
)
inline

Definition at line 339 of file factory_defs.hpp.

References Gambit::Printers::get_point_id(), combine_hdf5::rank, and daFunk::vec().

340  {
341  int rank = (*this)->getRank();
342  (*this)->getPrior().transform(vec, map);
343  double ret_val = (*this)->operator()(map);
344  unsigned long long int id = Gambit::Printers::get_point_id();
345  (*this)->getPrinter().print(ret_val, (*this)->getPurpose(), rank, id);
346  if (vec.size() > 0 && (*this)->getPrinter().get_printUnitcube())
347  (*this)->getPrinter().print(vec, "unitCubeParameters", rank, id);
348  (*this)->getPrinter().print(id, "pointID", rank, id);
349  (*this)->getPrinter().print(rank, "MPIrank", rank, id);
350  (*this)->getPrinter().enable(); // Make sure printer is re-enabled (might have been disabled by invalid point error)
351  // Return the value of the function, offset by any offset set
352  return ret_val + (*this)->getPurposeOffset();
353  }
EXPORT_SYMBOLS unsigned long long int & get_point_id()
Returns unigue pointid;.
std::unordered_map< std::string, double > map
Here is the call graph for this function:

Member Data Documentation

◆ map

std::unordered_map<std::string, double> Gambit::Scanner::like_ptr::map
private

Definition at line 315 of file factory_defs.hpp.


The documentation for this class was generated from the following file: