Evoplex  0.2.1
Public Member Functions | List of all members
evoplex::AttributeRangeInterface Class Referenceabstract

A common interface for the Attribute Range classes. More...

#include <attributerange.h>

Inheritance diagram for evoplex::AttributeRangeInterface:
evoplex::AttributeRange evoplex::IntervalOfValues evoplex::SetOfValues evoplex::SingleValue

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...
 

Detailed Description

A common interface for the Attribute Range classes.

See also
AttributeRange, SingleValue, IntervalOfValues, SetOfValues

Member Function Documentation

◆ next()

virtual Value evoplex::AttributeRangeInterface::next ( const Value v) const
pure virtual

Gets the value after v.

Parameters
vA 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.

◆ prev()

virtual Value evoplex::AttributeRangeInterface::prev ( const Value v) const
pure virtual

Gets the value before v.

Parameters
vA 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.

◆ rand()

virtual Value evoplex::AttributeRangeInterface::rand ( PRG prg) const
pure virtual

Gets a random value in the attribute range.

Parameters
prgA pointer to a valid PRG.

Implemented in evoplex::SetOfValues, evoplex::IntervalOfValues, and evoplex::SingleValue.


The documentation for this class was generated from the following file: