OPTK  0.1.2
Toolkit for global optimisation algorithms
Public Member Functions | Private Attributes | List of all members
inst::node Class Reference

#include <types.hpp>

Inheritance diagram for inst::node:
inst::param

Public Member Functions

 node (const std::string &k)
 
void add_item (param *p)
 
void add_items (std::vector< param *> items)
 
paramget_item (const std::string &k)
 
void remove_item (const std::string &k)
 
value_mapget_values ()
 
int getint (const std::string &key)
 
int getint (int i)
 
double getdbl (const std::string &key)
 
double getdbl (int i)
 
std::string getstr (const std::string &key)
 
std::string getstr (int i)
 
- Public Member Functions inherited from inst::param
 param (const std::string &k, inst_t t)
 
inst_t get_type ()
 
std::string get_key ()
 

Private Attributes

value_map values
 

Detailed Description

This represents concrete values at one 'level' of the search space. This could include a combination of both parameters and further nodes.

Constructor & Destructor Documentation

◆ node()

inst::node::node ( const std::string &  k)

The constructor k The key for this node.

Member Function Documentation

◆ add_item()

void inst::node::add_item ( param p)

Add a single parameter to the list.

Parameters
pThe parameter to add.

◆ add_items()

void inst::node::add_items ( std::vector< param *>  items)

Add a vector of parameter in one go.

Parameters
itemsA reference to the vector of items to add

◆ get_item()

inst::param * inst::node::get_item ( const std::string &  k)

Returns a copy of the specified parameter.

Parameters
kThe unique parameter key.

◆ get_values()

value_map* inst::node::get_values ( )
inline

Return all the values

Returns
The unordered map of key, parameter pairs

◆ remove_item()

void inst::node::remove_item ( const std::string &  k)

Removes a parameter from the list; fails silently on error.

Parameters
kThe unique key of that parameter.

Member Data Documentation

◆ values

value_map inst::node::values
private

An unordered map of concrete values and nodes at this 'level' of the search space, identified by their key


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