|
OPTK
0.1.2
Toolkit for global optimisation algorithms
|
Public Member Functions | |
| node (const std::string &k) | |
| ~node () | |
| void | add_item (param *p) |
| subspaces * | get_subspaces () |
| params * | get_values () |
| inst::param * | clone () |
| inst::set | step (inst::node *parent, bool *complete) |
Public Member Functions inherited from __gs::param | |
| param (const std::string &k, pspace_t t) | |
| pspace_t | get_type () |
| std::string | get_key () |
Private Attributes | |
| params | values |
| subspaces | nodes |
| std::vector< inst::param * > | local_params |
A node contains the parameters for this 'level' of the search space, including concrete parameters, and nested search spaces.
| __gs::node::node | ( | const std::string & | k | ) |
Construct a gridsearch node parameter with the given key.
| k | The idenfying key of this subspace. |
| __gs::node::~node | ( | ) |
This destructor will free all the local gridsearch nodes and values allocated on the heap.
| void __gs::node::add_item | ( | param * | p | ) |
Add a parameter or subspace to this 'level' of the search space. Addition of parameters after the first call to generate_parameters results in undefined behaviour.
| p | The new parameter to add. |
| inst::param * __gs::node::clone | ( | ) |
This creates a full copy of a node and all nested subspaces with the current values of local_params with memory allocated on the heap. This is used when iterating through values, and a subspace does not need to be updated.
|
inline |
Get the list of subspaces registered at this node.
|
inline |
Get the list of parameters in this (sub) search space.
| inst::set __gs::node::step | ( | inst::node * | parent, |
| bool * | complete | ||
| ) |
This will iterate through all the concrete parameters once, before calling step on each of the the elemnts in the nodes array.
| parent | A pointer to the node instance to which to add parameter values. |
| complete | A pointer to a boolean value which will be set to true if all values have been iterated over for this node. |
|
private |
This is a vector of all the non-node parameter instances.
|
private |
A local list of all the subspaces at this level in the search space; all parameter pointers in this array have type pspace_t::node.
|
private |
A local list of all the values at this level of the search space; all param pointers in this array have type pspace_t::value.
1.8.13