Evoplex
0.2.1
|
A common interface for the Attribute Range classes. More...
#include <attributerange.h>
Public Member Functions | |
virtual | ~AttributeRangeInterface ()=default |
Destructor. | |
virtual Value | rand (PRG *prg) const =0 |
Gets a random value in the attribute range. More... | |
virtual Value | next (const Value &v) const =0 |
Gets the value after v . More... | |
virtual Value | prev (const Value &v) const =0 |
Gets the value before v . More... | |
A common interface for the Attribute Range classes.
Gets the value after v
.
v | A value in the attribute range. If v is the last, it returns the first value in the attrRange. if v is not in the attrRange, it returns v . |
Implemented in evoplex::SetOfValues, evoplex::IntervalOfValues, and evoplex::SingleValue.
Gets the value before v
.
v | A value in the attribute range. If v is the first, it returns the last value in the attrRange. if v is not in the attrRange, it returns v . |
Implemented in evoplex::SetOfValues, evoplex::IntervalOfValues, and evoplex::SingleValue.
Gets a random value in the attribute range.
prg | A pointer to a valid PRG. |
Implemented in evoplex::SetOfValues, evoplex::IntervalOfValues, and evoplex::SingleValue.