EvoParam - class that represents a parameter that is modifiable (optimizable) by evolutionary algorithms.
More...
#include <EvoParam.hh>
|
| void | Randomize (std::mt19937_64 &rand_gen) |
| | Sets to a random possible value from a domain. More...
|
| |
|
const EvoParam * | SetNext () |
| | Sets to the next possible value in the domain (wrapped, i.e. last.next -> first) and returns itself.
|
| |
|
const EvoParam * | SetPrev () |
| | Sets to the previous possible value in the domain (wrapped, i.e. first.prev -> last) and returns itself.
|
| |
|
const EvoParam * | SetNextClamped () |
| | Sets to the next possible value in the domain (clamped, i.e. last.next -> last) and returns itself.
|
| |
|
const EvoParam * | SetPrevClamped () |
| | Sets to the previous possible value in the domain (clamped, i.e. first.prev -> first) and returns itself.
|
| |
|
float | GetNormalizedPositionWeight () const |
| | Returns the normalized position as [0.0, 1.0] floating point number.
|
| |
|
size_t | GetPositionIndex () const |
| | Returns the position of the parameter i.e. the index of the currently assigned element from the domain.
|
| |
| void | SetPositionIndex (size_t position) |
| | Sets the position of the parameter i.e. the index of the currently assigned element from the domain. More...
|
| |
| virtual std::string | ToString () const |
| | ToString - returns the string representation of the current value hold by the parameter. More...
|
| |
EvoParam - class that represents a parameter that is modifiable (optimizable) by evolutionary algorithms.
◆ EvoParam()
| grail::evolution::EvoParam::EvoParam |
( |
size_t |
domainLength | ) |
|
|
protected |
EvoParam - Constructor.
- Parameters
-
| domainLength | - the number of distinct values EvoParam may take. |
◆ Randomize()
| void grail::evolution::EvoParam::Randomize |
( |
std::mt19937_64 & |
rand_gen | ) |
|
Sets to a random possible value from a domain.
- Parameters
-
| rand_gen | - random number generator. |
◆ SetPositionIndex()
| void grail::evolution::EvoParam::SetPositionIndex |
( |
size_t |
position | ) |
|
Sets the position of the parameter i.e. the index of the currently assigned element from the domain.
- Parameters
-
| position | - the number >= 0 and < domainLength. |
◆ ToString()
| std::string grail::evolution::EvoParam::ToString |
( |
| ) |
const |
|
virtual |
◆ positionIndex
| size_t grail::evolution::EvoParam::positionIndex |
|
protected |
positionIndex - EvoParam uses positionIndex to point to an element from its domain.
The documentation for this class was generated from the following files: