OPTK  0.1.2
Toolkit for global optimisation algorithms
Classes | Typedefs | Enumerations | Functions
inst Namespace Reference

Classes

class  dbl_val
 
class  int_val
 
class  node
 
class  param
 
class  str_val
 

Typedefs

typedef nodeset
 
typedef std::unordered_map< std::string, param * > value_map
 

Enumerations

enum  inst_t : char { inst_t::node, inst_t::int_val, inst_t::dbl_val, inst_t::str_val }
 

Functions

template<class T >
get (node *n, const std::string &k)
 
void free_node (node *n)
 

Detailed Description

Entries in the inst namespace represent concrete instances or settings of a search spce.

Typedef Documentation

◆ set

typedef node* inst::set

This is a concrete set of parameter value assignments, used to pass parameter values between optimisers and benchmarks.

The optimisation algorithm is responsible for managing the memory allocated to pass these parameters, the benchmark or program simply consumes these values.

◆ value_map

typedef std::unordered_map<std::string, param *> inst::value_map

This is used to succinctly describe a map of key, parameter pairs.

Enumeration Type Documentation

◆ inst_t

enum inst::inst_t : char
strong

These allow concrete instnaces of nested search spaces to be represented.

Enumerator
node 

Used to designate the parameter set as containing a list of values

int_val 

represents an integer value

dbl_val 

represents a double-precision floating point value

str_val 

represents a string value

Function Documentation

◆ free_node()

void inst::free_node ( inst::node n)

This will recursively free a search space instance, with elements allocated on the heap.

Parameters
nA pointer to the base node element, which is itself allocated on the heap.

◆ get()

template<class T >
T inst::get ( node n,
const std::string &  k 
)

This is a convenience function to access a member of an inst::node item. The template type must be a pointer to one of the enumerated values in inst::inst_t; namely a node, int_val, dbl_val or str_val.