namespace Gambit::Scanner
[No description available]
Namespaces
Name |
---|
Gambit::Scanner::Errors |
Gambit::Scanner::Plugins |
Classes
Types
Name | |
---|---|
typedef Priors::BasePrior | prior_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::BasePrinterManager | printer_interface typedef printer_interface_temp printer_interface; |
typedef Printers::BaseBasePrinter | printer 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 | |
---|---|
void | input_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) |
double | pow< 0 >(const double & ) |
double | pow< 1 >(const double & a) |
template <int i> int | pow(const int & a) |
int | pow< 0 >(const int & ) |
int | pow< 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 & ) |
void | resume_file_input(std::ifstream & in, std::string & param) |
void | resume_file_output(std::ofstream & out, std::string & param) |
size_t | resume_size_of(std::string & param) |
void | assign_aux_numbers() |
template <typename… T> void | assign_aux_numbers(const std::string & tag, const T &… params) |
std::string | pytype(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::object | yaml_to_dict(const YAML::Node & node) Converts a YAML node to a Python dictionary. |
YAML::Node | dict_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::string | demangle(const std::string & in) Demangles gnu c++ name. |
template <typename T > std::vector< T > | get_yaml_vector(const YAML::Node & node) |
int | StringToInt(const std::string & str) Converts a string to an int. |
std::string | IntToString(const int & in) Converts a int into a string. |
double | pi() 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}, …]. |
int | register_ScannerBit_handlers() |
bool | notUnit(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) |
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) |
YAML::Node | combineNodes(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 |
int | ScannerBit_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