◆ generate_parameters()
| inst::set random_search::generate_parameters |
( |
int |
param_id | ) |
|
|
overridevirtual |
The random search optimiser will simply generate the relevant parameters by calling the sample method of parameters in the search space.
- Parameters
-
| param_id | A largely disregarded parameter; save for internal memory management. |
- Returns
- A randomly generated set of valid parameters, with no guarantees of uniqueness.
Reimplemented from optk::optimiser.
◆ receive_trial_results()
| void random_search::receive_trial_results |
( |
int |
param_id, |
|
|
inst::set |
params, |
|
|
double |
value |
|
) |
| |
|
overridevirtual |
Allows the benchmark or program being optimised to communicate back the value of the cost function for a parameter set.
- Parameters
-
| param_id | This parameter id is used to identify the parameters used to generate the result. |
| parameters | For increased flexibility, the actual parameters used to generate the result are also copied back. |
| value | The actual value of the objective function. |
Reimplemented from optk::optimiser.
◆ sample_ss()
| void random_search::sample_ss |
( |
inst::node * |
parent | ) |
|
|
private |
This function recursively traverses the search space, sampling a value at random from each of the parameters.
- Parameters
-
| parent | A pointer to the parent instance node to which to store the results. |
◆ update_search_space()
This updates the search space defined by the optimiser.
- Parameters
-
| space | The new search space to use |
Reimplemented from optk::optimiser.
◆ m_space
A copy of the problem search space
The documentation for this class was generated from the following files: