Generate random selection of assignments. More...
#include <float.hh>
Public Member Functions | |
RandomAssignment (int n, const Gecode::FloatVal &d, int a) | |
Initialize for a assignments for n variables and values d. More... | |
virtual bool | operator() (void) const |
Test whether all assignments have been iterated. More... | |
virtual void | operator++ (void) |
Move to next assignment. More... | |
virtual Gecode::FloatVal | operator[] (int i) const |
Return value for variable i. More... | |
virtual void | set (int i, const Gecode::FloatVal &val) |
Set assignment to value val for variable i. More... | |
virtual | ~RandomAssignment (void) |
Destructor. More... | |
![]() | |
Assignment (int n0, const Gecode::FloatVal &d0) | |
Initialize assignments for n0 variables and values d0. More... | |
int | size (void) const |
Return number of variables. More... | |
virtual | ~Assignment (void) |
Destructor. More... | |
Protected Member Functions | |
Gecode::FloatNum | randval (void) |
Protected Attributes | |
Gecode::FloatVal * | vals |
The current values for the variables. More... | |
int | a |
How many assigments still to be generated Generate new value according to domain. More... | |
![]() | |
int | n |
Number of variables. More... | |
Gecode::FloatVal | d |
Domain for each variable. More... | |
|
inline |
|
inlinevirtual |
|
inlineprotected |
|
inlinevirtual |
Test whether all assignments have been iterated.
Implements Test::Float::Assignment.
|
virtual |
Move to next assignment.
Implements Test::Float::Assignment.
|
inlinevirtual |
Return value for variable i.
Implements Test::Float::Assignment.
|
inlinevirtual |
Set assignment to value val for variable i.
Implements Test::Float::Assignment.
|
protected |
|
protected |