Class for random value selection. More...
#include <branch.hh>
Public Types | |
typedef _View | View |
View type. More... | |
typedef int | Val |
Value type. More... | |
typedef ArchivedRandomGenerator | Choice |
Choice type. More... | |
Public Member Functions | |
ValRnd (void) | |
Default constructor. More... | |
ValRnd (Space &home, const ValBranchOptions &vbo) | |
Constructor for initialization. More... | |
int | val (Space &home, _View x) |
Return minimum value of view x. More... | |
ModEvent | tell (Space &home, unsigned int a, _View x, int n) |
Tell ![]() ![]() | |
Choice | choice (Space &home) |
Return choice. More... | |
Choice | choice (const Space &home, Archive &e) |
Return choice. More... | |
void | commit (Space &home, const Choice &c, unsigned a) |
Commit to choice. More... | |
void | update (Space &home, bool share, ValRnd &vs) |
Updating during cloning. More... | |
void | dispose (Space &home) |
Delete value selection. More... | |
Static Public Attributes | |
static const unsigned int | alternatives = 2 |
Number of alternatives. More... | |
Protected Attributes | |
ArchivedRandomGenerator | r |
The random number generator. More... | |
Class for random value selection.
Requires
typedef _View Gecode::Int::Branch::ValRnd< _View >::View |
typedef int Gecode::Int::Branch::ValRnd< _View >::Val |
typedef ArchivedRandomGenerator Gecode::Int::Branch::ValRnd< _View >::Choice |
|
inline |
Default constructor.
Definition at line 79 of file select-val.hpp.
|
inline |
Constructor for initialization.
Definition at line 82 of file select-val.hpp.
|
inline |
Return minimum value of view x.
Definition at line 86 of file select-val.hpp.
|
inline |
Tell (a = 0) or
(a = 1)
Definition at line 98 of file select-val.hpp.
|
inline |
Return choice.
Definition at line 103 of file select-val.hpp.
|
inline |
Return choice.
Definition at line 108 of file select-val.hpp.
|
inline |
Commit to choice.
Definition at line 113 of file select-val.hpp.
|
inline |
Updating during cloning.
Definition at line 118 of file select-val.hpp.
|
inline |
Delete value selection.
Definition at line 123 of file select-val.hpp.
|
protected |
|
static |