namespace Gambit::Scanner

[No description available]

Namespaces

Name
Gambit::Scanner::Errors
Gambit::Scanner::Plugins

Classes

Name
structGambit::Scanner::find_variadic_type
structGambit::Scanner::find_variadic_type< false, false, true, T… >
structGambit::Scanner::find_variadic_type< false, true, b2, T… >
structGambit::Scanner::find_variadic_type< true, b1, b2, T… >
structGambit::Scanner::find_variadic_type_convert
structGambit::Scanner::find_variadic_type_convert< b, Tc, T1, T… >
structGambit::Scanner::find_variadic_type_convert< true, Tc, T1, T… >
structGambit::Scanner::find_variadic_type_not_exact
structGambit::Scanner::find_variadic_type_not_exact< void(args…), ret(args…), T1, T… >
structGambit::Scanner::find_variadic_type_not_exact< void(args…), ret(args2…), T1, T… >
structGambit::Scanner::is_args_convertible
structGambit::Scanner::is_args_convertible< false, T1, T2 >
structGambit::Scanner::find_variadic_type_convert
structGambit::Scanner::find_variadic_type_convert< Tc, T1, T… >
structGambit::Scanner::find_variadic_type_not_exact
structGambit::Scanner::find_variadic_type_not_exact< T1, T2, T… >
classGambit::Scanner::Factory_Base
Pure Base class of a plugin Factory function.
structGambit::Scanner::find_variadic_type
structGambit::Scanner::find_variadic_type_convert
structGambit::Scanner::find_variadic_type_convert< ret(args…)>
structGambit::Scanner::find_variadic_type_exact
structGambit::Scanner::find_variadic_type_exact< void(args…), ret(args…), T… >
structGambit::Scanner::find_variadic_type_exact< void(args…), ret(args2…), T… >
structGambit::Scanner::find_variadic_type_exact< void(args…)>
structGambit::Scanner::find_variadic_type_not_exact
structGambit::Scanner::find_variadic_type_not_exact< void(args…)>
structGambit::Scanner::first_arg_type
structGambit::Scanner::first_arg_type< ret()>
structGambit::Scanner::first_arg_type< ret(T, args…)>
structGambit::Scanner::func_ptr_type
structGambit::Scanner::func_ptr_type< void(args…)>
classGambit::Scanner::Function_Base
Generic function base used by the scanner. Can be Likelihood, observables, etc.
classGambit::Scanner::Function_Base< ret(args…)>
Base function for the object that is upputed by “set_purpose”.
classGambit::Scanner::Function_Deleter
Functor that deletes a Function_Base functor.
classGambit::Scanner::Function_Deleter< ret(args…)>
structGambit::Scanner::is_args_convertible
structGambit::Scanner::is_args_convertible< ret1(), ret2()>
structGambit::Scanner::is_args_convertible< ret1(arg1, args1…), ret2(arg2, args2…)>
classGambit::Scanner::like_ptr
likelihood pointer holder for scanner plugins.
classGambit::Scanner::Multi_Scanner_Plugin_Function
classGambit::Scanner::Multi_Scanner_Plugin_Function< ret(args…)>
Objective functor made up of multiple plugins.
classGambit::Scanner::Plugin_Function_Factory
Factory class to make objectives using objective plugins.
structGambit::Scanner::point_info
classGambit::Scanner::RanNumGen
structGambit::Scanner::remove_all_func
structGambit::Scanner::remove_all_func< ret(args…)>
classGambit::Scanner::resume_params_func
class to interface with the plugin manager resume functions.
structGambit::Scanner::return_type
structGambit::Scanner::return_type< ret(args…)>
classGambit::Scanner::Scan_Manager
classGambit::Scanner::scan_ptr
Generic ptr that takes ownership of a Function_Base. This is how a plugin will call a function.
classGambit::Scanner::scan_ptr< ret(args…)>
Container class that hold the output of the “get_purpose” function.
classGambit::Scanner::Scanner_Plugin_Function
classGambit::Scanner::Scanner_Plugin_Function< ret(args…)>
Objective functor made up a single plugin.

Types

Name
typedef Priors::BasePriorprior_interface
typedef void *(const std::map< std::string, std::vector< std::string > > &, const std::vector< std::pair< std::string, std::string > > &, const Factory_Base &)multi_func_type
typedef Printers::BasePrinterManagerprinter_interface
typedef printer_interface_temp printer_interface;
typedef Printers::BaseBasePrinterprinter
Type of the printer objects.
template <typename T >
using Eigen::Matrix< T, Eigen::Dynamic, 1 >
vector
A vector.
template <typename T >
using Eigen::Matrix< T, 1, Eigen::Dynamic >
row_vector
A row vector.
template <typename T >
using Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >
matrix
A matrix.
template <typename T >
using Eigen::Ref< vector< T >, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > >
hyper_cube_ref
Represents the unit hypercube.
template <typename T >
using Eigen::Map< vector< T >, Eigen::Unaligned, Eigen::Stride< 1, 1 > >
map_vector
Vector using raw data.

Functions

Name
voidinput_variadic_vector(std::vector< void * > & )
template <typename T ,typename… args>
void
input_variadic_vector(std::vector< void * > & input, const T & value, const args &… params)
template <typename ret >
std::enable_if<!std::is_floating_point< ret >::value, ret >::type
scanner_plugin_def_ret()
template <typename ret >
std::enable_if< std::is_floating_point< ret >::value, ret >::type
scanner_plugin_def_ret()
template <int i>
double
pow(const double & a)
doublepow< 0 >(const double & )
doublepow< 1 >(const double & a)
template <int i>
int
pow(const int & a)
intpow< 0 >(const int & )
intpow< 1 >(const int & a)
template <typename T >
std::enable_if< is_container< T >::value, std::ostream & >::type
operator«(std::ostream & out, const T & in)
template <typename T >
std::enable_if< is_pair< T >::value, std::ostream & >::type
operator«(std::ostream & out, const T & in)
template <typename T >
std::enable_if<< T >::value &&< T >::value, void >::type
resume_file_output(std::ofstream & out, T & param)
template <typename T >
std::enable_if< is_container< T >::value, void >::type
resume_file_output(std::ofstream & out, T & param)
template <typename T >
std::enable_if< is_pair< T >::value, void >::type
resume_file_output(std::ofstream & out, T & param)
template <typename T >
std::enable_if<< T >::value &&< T >::value, void >::type
resume_file_input(std::ifstream & in, T & param)
template <typename T >
std::enable_if< is_container< T >::value, void >::type
resume_file_input(std::ifstream & in, T & param)
template <typename T >
std::enable_if< is_pair< T >::value, void >::type
resume_file_input(std::ifstream & in, T & param)
template <typename T >
std::enable_if<< T >::value &&< T >::value, size_t >::type
resume_size_of(T & )
template <typename T >
std::enable_if< is_container< T >::value, size_t >::type
resume_size_of(T & param)
template <typename T >
std::enable_if< is_pair< T >::value, size_t >::type
resume_size_of(T & )
voidresume_file_input(std::ifstream & in, std::string & param)
voidresume_file_output(std::ofstream & out, std::string & param)
size_tresume_size_of(std::string & param)
voidassign_aux_numbers()
template <typename… T>
void
assign_aux_numbers(const std::string & tag, const T &… params)
std::stringpytype(py::handle o)
Determines the Python type of a given object.
template <typename T >
bool
is_pytype(py::kwargs args, const std::string & type =“dtype”, bool def_type =false)
Checks if a given Python object matches a specified type.
py::objectyaml_to_dict(const YAML::Node & node)
Converts a YAML node to a Python dictionary.
YAML::Nodedict_to_yaml(py::handle o)
Converts a Python dictionary to a YAML node.
EXPORT_SYMBOLS error &scan_error()
Scanner errors.
EXPORT_SYMBOLS warning &scan_warning()
Scanner warnings.
template <typename… T>
auto
zip(const T &… containers)
Use for combine container in a range loop: for (auto &&x : zip(a, b)){…}.
std::stringdemangle(const std::string & in)
Demangles gnu c++ name.
template <typename T >
std::vector< T >
get_yaml_vector(const YAML::Node & node)
intStringToInt(const std::string & str)
Converts a string to an int.
std::stringIntToString(const int & in)
Converts a int into a string.
doublepi()
Output pi.
std::map< std::string, std::vector< std::string > >convert_to_map(const std::vector< std::string > & vec)
Turns a vector with enters [model::parameter, …] into a map with [{model, parameter}, …].
intregister_ScannerBit_handlers()
boolnotUnit(const std::vector< double > & in)
template <typename T >
T::iterator::pointer
c_ptr(T & it)
std::vector< std::vector< double > >calcCov(const std::vector< std::vector< double > > & pts)
std::vector< std::vector< double > >calcIndent(const std::vector< std::vector< double > > & pts)
voidTWalk(Gambit::Scanner::like_ptr LogLike, Gambit::Scanner::printer_interface & printer, Gambit::Scanner::resume_params_func set_resume_params, const int & dimension, const double & div, const int & proj, const double & din, const double & alim, const double & alimt, const long long & rand, const double & sqrtR, const int & NChains, const bool & hyper_grid, const int & burn_in, const int & save_freq, const double & hrs_max)
YAML::NodecombineNodes(const std::map< std::string, YAML::Node > & nodesMap, const YAML::Node & node)

Attributes

Name
gambit_registry
std::unordered_map< type_index, func_type *, Gambit::type_hasher, Gambit::type_equal_to >functions
std::unordered_map< type_index, multi_func_type * >multi_functions
intScannerBit_handlers

Types Documentation

typedef prior_interface

typedef Priors::BasePrior Gambit::Scanner::prior_interface;

typedef multi_func_type

typedef void * Gambit::Scanner::multi_func_type(const std::map< std::string, std::vector< std::string > > &, const std::vector< std::pair< std::string, std::string > > &, const Factory_Base &);

typedef printer_interface

typedef Printers::BasePrinterManager Gambit::Scanner::printer_interface;

typedef printer_interface_temp printer_interface;

typedef printer

typedef Printers::BaseBasePrinter Gambit::Scanner::printer;

Type of the printer objects.

using vector

template <typename T >
using Gambit::Scanner::vector = typedef Eigen::Matrix<T, Eigen::Dynamic, 1>;

A vector.

using row_vector

template <typename T >
using Gambit::Scanner::row_vector = typedef Eigen::Matrix<T, 1, Eigen::Dynamic>;

A row vector.

using matrix

template <typename T >
using Gambit::Scanner::matrix = typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>;

A matrix.

using hyper_cube_ref

template <typename T >
using Gambit::Scanner::hyper_cube_ref = typedef Eigen::Ref<vector<T>, 0, Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic> >;

Represents the unit hypercube.

using map_vector

template <typename T >
using Gambit::Scanner::map_vector = typedef Eigen::Map<vector<T>, Eigen::Unaligned, Eigen::Stride<1, 1> >;

Vector using raw data.

Functions Documentation

function input_variadic_vector

inline void input_variadic_vector(
    std::vector< void * > & 
)

Inputs a varibadic pack into a vector

function input_variadic_vector

template <typename T ,
typename... args>
inline void input_variadic_vector(
    std::vector< void * > & input,
    const T & value,
    const args &... params
)

function scanner_plugin_def_ret

template <typename ret >
std::enable_if<!std::is_floating_point< ret >::value, ret >::type scanner_plugin_def_ret()

Turns a type into an object. If it’s a floating point number, it replaces it with a big negative number.

function scanner_plugin_def_ret

template <typename ret >
std::enable_if< std::is_floating_point< ret >::value, ret >::type scanner_plugin_def_ret()

function pow

template <int i>
inline double pow(
    const double & a
)

Outputs a^i

function pow< 0 >

inline double pow< 0 >(
    const double & 
)

function pow< 1 >

inline double pow< 1 >(
    const double & a
)

function pow

template <int i>
inline int pow(
    const int & a
)

function pow< 0 >

inline int pow< 0 >(
    const int & 
)

function pow< 1 >

inline int pow< 1 >(
    const int & a
)

function operator«

template <typename T >
inline std::enable_if< is_container< T >::value, std::ostream & >::type operator<<(
    std::ostream & out,
    const T & in
)

Outputs containers to an output stream

function operator«

template <typename T >
inline std::enable_if< is_pair< T >::value, std::ostream & >::type operator<<(
    std::ostream & out,
    const T & in
)

function resume_file_output

template <typename T >
inline std::enable_if<!is_container< T >::value &&!is_pair< T >::value, void >::type resume_file_output(
    std::ofstream & out,
    T & param
)

Functions to output data for the plugin resume functions

function resume_file_output

template <typename T >
inline std::enable_if< is_container< T >::value, void >::type resume_file_output(
    std::ofstream & out,
    T & param
)

function resume_file_output

template <typename T >
inline std::enable_if< is_pair< T >::value, void >::type resume_file_output(
    std::ofstream & out,
    T & param
)

function resume_file_input

template <typename T >
std::enable_if<!is_container< T >::value &&!is_pair< T >::value, void >::type resume_file_input(
    std::ifstream & in,
    T & param
)

function resume_file_input

template <typename T >
inline std::enable_if< is_container< T >::value, void >::type resume_file_input(
    std::ifstream & in,
    T & param
)

function resume_file_input

template <typename T >
inline std::enable_if< is_pair< T >::value, void >::type resume_file_input(
    std::ifstream & in,
    T & param
)

function resume_size_of

template <typename T >
inline std::enable_if<!is_container< T >::value &&!is_pair< T >::value, size_t >::type resume_size_of(
    T & 
)

function resume_size_of

template <typename T >
inline std::enable_if< is_container< T >::value, size_t >::type resume_size_of(
    T & param
)

function resume_size_of

template <typename T >
inline std::enable_if< is_pair< T >::value, size_t >::type resume_size_of(
    T & 
)

function resume_file_input

inline void resume_file_input(
    std::ifstream & in,
    std::string & param
)

function resume_file_output

inline void resume_file_output(
    std::ofstream & out,
    std::string & param
)

function resume_size_of

inline size_t resume_size_of(
    std::string & param
)

function assign_aux_numbers

inline void assign_aux_numbers()

function assign_aux_numbers

template <typename... T>
inline void assign_aux_numbers(
    const std::string & tag,
    const T &... params
)

function pytype

inline std::string pytype(
    py::handle o
)

Determines the Python type of a given object.

Parameters:

  • obj The Python object whose type is to be determined.

Return: A string representation of the Python object’s type.

This function inspects a Python object and returns a string representation of its type.

function is_pytype

template <typename T >
bool is_pytype(
    py::kwargs args,
    const std::string & type ="dtype",
    bool def_type =false
)

Checks if a given Python object matches a specified type.

Parameters:

  • args The Python kwargs object containing the arguments.
  • type The key in the kwargs to check the type of. Defaults to “dtype”.
  • def_type The default return value if the type key is not found in the kwargs. Defaults to false.

Template Parameters:

  • T The type to check against.

Return: True if the object matches the specified type, false otherwise.

This function inspects a Python object and checks if it matches the specified type.

function yaml_to_dict

inline py::object yaml_to_dict(
    const YAML::Node & node
)

Converts a YAML node to a Python dictionary.

Parameters:

  • node The YAML node to be converted.

Return: A Python dictionary that represents the YAML node.

This function recursively traverses a YAML node and constructs a corresponding Python dictionary.

function dict_to_yaml

inline YAML::Node dict_to_yaml(
    py::handle o
)

Converts a Python dictionary to a YAML node.

Parameters:

  • o The Python object to be converted.

Return: A YAML node that represents the Python dictionary.

This function recursively traverses a Python dictionary and constructs a corresponding YAML node.

function scan_error

EXPORT_SYMBOLS error & scan_error()

Scanner errors.

function scan_warning

EXPORT_SYMBOLS warning & scan_warning()

Scanner warnings.

function zip

template <typename... T>
inline auto zip(
    const T &... containers
)

Use for combine container in a range loop: for (auto &&x : zip(a, b)){…}.

function demangle

inline std::string demangle(
    const std::string & in
)

Demangles gnu c++ name.

function get_yaml_vector

template <typename T >
inline std::vector< T > get_yaml_vector(
    const YAML::Node & node
)

Input a vector from the yaml file of the following forms: vec: [a, b, …] vec: a, b, … vec: a; b; …

function StringToInt

inline int StringToInt(
    const std::string & str
)

Converts a string to an int.

function IntToString

inline std::string IntToString(
    const int & in
)

Converts a int into a string.

function pi

inline double pi()

Output pi.

function convert_to_map

inline std::map< std::string, std::vector< std::string > > convert_to_map(
    const std::vector< std::string > & vec
)

Turns a vector with enters [model::parameter, …] into a map with [{model, parameter}, …].

function register_ScannerBit_handlers

int register_ScannerBit_handlers()

function notUnit

inline bool notUnit(
    const std::vector< double > & in
)

function c_ptr

template <typename T >
inline T::iterator::pointer c_ptr(
    T & it
)

function calcCov

inline std::vector< std::vector< double > > calcCov(
    const std::vector< std::vector< double > > & pts
)

function calcIndent

inline std::vector< std::vector< double > > calcIndent(
    const std::vector< std::vector< double > > & pts
)

function TWalk

void TWalk(
    Gambit::Scanner::like_ptr LogLike,
    Gambit::Scanner::printer_interface & printer,
    Gambit::Scanner::resume_params_func set_resume_params,
    const int & dimension,
    const double & div,
    const int & proj,
    const double & din,
    const double & alim,
    const double & alimt,
    const long long & rand,
    const double & sqrtR,
    const int & NChains,
    const bool & hyper_grid,
    const int & burn_in,
    const int & save_freq,
    const double & hrs_max
)

function combineNodes

inline YAML::Node combineNodes(
    const std::map< std::string, YAML::Node > & nodesMap,
    const YAML::Node & node
)

Attributes Documentation

variable gambit_registry

gambit_registry {
            typedef void* func_type(const std::vector<std::string> &, const std::string &, const Factory_Base &);

variable functions

std::unordered_map< type_index, func_type *, Gambit::type_hasher, Gambit::type_equal_to > __functions__;

variable multi_functions

std::unordered_map< type_index, multi_func_type * > __multi_functions__;

variable ScannerBit_handlers

int ScannerBit_handlers = register_ScannerBit_handlers();

Updated on 2024-07-18 at 13:53:32 +0000