Gecode::Int::Branch::ValRnd< _View > Class Template Reference
Class for random value selection. More...
#include <branch.hh>
Public Types | |
typedef _View | View |
View type. | |
typedef int | Val |
Value type. | |
typedef Support::RandomGenerator | Choice |
Choice type. | |
Public Member Functions | |
ValRnd (void) | |
Default constructor. | |
ValRnd (Space &home, const ValBranchOptions &vbo) | |
Constructor for initialization. | |
int | val (Space &home, _View x) |
Return minimum value of view x. | |
ModEvent | tell (Space &home, unsigned int a, _View x, int n) |
Tell ![]() ![]() | |
Support::RandomGenerator | choice (Space &home) |
Return choice. | |
void | commit (Space &home, const Support::RandomGenerator &c, unsigned a) |
Commit to choice. | |
void | update (Space &home, bool share, ValRnd &vs) |
Updating during cloning. | |
void | dispose (Space &home) |
Delete value selection. | |
Static Public Attributes | |
static const unsigned int | alternatives = 2 |
Number of alternatives. | |
Protected Attributes | |
Support::RandomGenerator | r |
Random number generator. |
Detailed Description
template<class _View>
class Gecode::Int::Branch::ValRnd< _View >
Class for random value selection.
Requires
#include <gecode/int/branch.hh>
Member Typedef Documentation
template<class _View>
typedef _View Gecode::Int::Branch::ValRnd< _View >::View |
template<class _View>
typedef int Gecode::Int::Branch::ValRnd< _View >::Val |
template<class _View>
typedef Support::RandomGenerator Gecode::Int::Branch::ValRnd< _View >::Choice |
Constructor & Destructor Documentation
template<class View >
Gecode::Int::Branch::ValRnd< View >::ValRnd | ( | void | ) | [inline] |
Default constructor.
Definition at line 79 of file select-val.hpp.
template<class View >
Gecode::Int::Branch::ValRnd< View >::ValRnd | ( | Space & | home, |
const ValBranchOptions & | vbo | ||
) | [inline] |
Constructor for initialization.
Definition at line 82 of file select-val.hpp.
Member Function Documentation
template<class View>
int Gecode::Int::Branch::ValRnd< View >::val | ( | Space & | home, |
View | x | ||
) | [inline] |
Return minimum value of view x.
Definition at line 86 of file select-val.hpp.
template<class View>
ModEvent Gecode::Int::Branch::ValRnd< View >::tell | ( | Space & | home, |
unsigned int | a, | ||
View | x, | ||
int | n | ||
) | [inline] |
Tell (a = 0) or
(a = 1)
Definition at line 98 of file select-val.hpp.
template<class View >
Support::RandomGenerator Gecode::Int::Branch::ValRnd< View >::choice | ( | Space & | home | ) | [inline] |
Return choice.
Definition at line 103 of file select-val.hpp.
template<class View >
void Gecode::Int::Branch::ValRnd< View >::commit | ( | Space & | home, |
const Support::RandomGenerator & | c, | ||
unsigned | a | ||
) | [inline] |
Commit to choice.
Definition at line 108 of file select-val.hpp.
template<class View >
void Gecode::Int::Branch::ValRnd< View >::update | ( | Space & | home, |
bool | share, | ||
ValRnd< _View > & | vs | ||
) | [inline] |
Updating during cloning.
Definition at line 114 of file select-val.hpp.
template<class View >
void Gecode::Int::Branch::ValRnd< View >::dispose | ( | Space & | home | ) | [inline] |
Delete value selection.
Definition at line 119 of file select-val.hpp.
Member Data Documentation
template<class _View>
Support::RandomGenerator Gecode::Int::Branch::ValRnd< _View >::r [protected] |
template<class _View>
const unsigned int Gecode::Int::Branch::ValRnd< _View >::alternatives = 2 [static] |
Number of alternatives.
Reimplemented in Gecode::Int::Branch::AssignValRnd< View >.
The documentation for this class was generated from the following files:
- gecode/int/branch.hh (Revision: 11371)
- gecode/int/branch/select-val.hpp (Revision: 9975)