A class that represents a parameter that is modifiable (optimizable) by evolutionary algorithms.
Unless your parameter is only a positional index (represented by an integer from 0 to max), use a specialized version EvoParam<Type>.
These parameters form an encoding and are stored as member Fields or Properties in an Individual and set as optimizable using Individual.SetMemberParameterOptimizable.
Typically, the Individual.SetMemberParameterOptimizable function should be called in the constructor of an Individual-derived class.
More...
|
| int | PositionIndex [get, set] |
| | EvoParam uses PositionIndex to point to an element from its domain.
Setting this index makes the parameter hold the PositionIndex-ith value from the domain. Index starts at zero. More...
|
| |
A class that represents a parameter that is modifiable (optimizable) by evolutionary algorithms.
Unless your parameter is only a positional index (represented by an integer from 0 to max), use a specialized version EvoParam<Type>.
These parameters form an encoding and are stored as member Fields or Properties in an Individual and set as optimizable using Individual.SetMemberParameterOptimizable.
Typically, the Individual.SetMemberParameterOptimizable function should be called in the constructor of an Individual-derived class.
◆ BaseEvoParam()
| Grail.Evolution.BaseEvoParam.BaseEvoParam |
( |
int |
domainLength | ) |
|
|
inline |
Constructs a new EvoParam.
- Parameters
-
| domainLength | The number of distinct values EvoParam may take. |
◆ Randomize()
| void Grail.Evolution.BaseEvoParam.Randomize |
( |
Random |
random | ) |
|
|
inline |
Sets to a random possible value from a domain.
- Parameters
-
| random | Random number generator. |
◆ SetNext()
Sets to the next possible value in the domain (wrapped, i.e. last.next -> first).
- Returns
- The EvoParam returns itself.
◆ SetNextClamped()
| BaseEvoParam Grail.Evolution.BaseEvoParam.SetNextClamped |
( |
| ) |
|
|
inline |
Sets to the next possible value in the domain (clamped, i.e. last.next -> last).
- Returns
- The EvoParam returns itself.
◆ SetPrev()
Sets to the previous possible value in the domain (wrapped, i.e. first.prev -> last).
- Returns
- The EvoParam returns itself.
◆ SetPrevClamped()
| BaseEvoParam Grail.Evolution.BaseEvoParam.SetPrevClamped |
( |
| ) |
|
|
inline |
Sets to the previous possible value in the domain (clamped, i.e. first.prev -> first).
- Returns
- The EvoParam returns itself.
◆ domainLength
| readonly int Grail.Evolution.BaseEvoParam.domainLength |
The number of distinct values the parameter may take.
◆ NormalizedPositionWeight
The normalized position, between 0.0 and 1.0, is the ratio of the current position index to the domainLength.
◆ PositionIndex
| int Grail.Evolution.BaseEvoParam.PositionIndex |
|
getset |
EvoParam uses PositionIndex to point to an element from its domain.
Setting this index makes the parameter hold the PositionIndex-ith value from the domain. Index starts at zero.
The documentation for this class was generated from the following file:
- GrailEvolution/source/EvoParam.cs