JaCoP.search
Class IndomainRandom<T extends IntVar>

java.lang.Object
  extended by JaCoP.search.IndomainRandom<T>
Type Parameters:
T - type of variable being used in the search.
All Implemented Interfaces:
Indomain<T>

public class IndomainRandom<T extends IntVar>
extends java.lang.Object
implements Indomain<T>

IndomainRandom - implements enumeration method based on the selection of the random value in the domain of FD variable. Can split domains into multiple intervals

Version:
3.1
Author:
Radoslaw Szymanek and Krzysztof Kuchcinski

Constructor Summary
IndomainRandom()
          It specifies Indomain function, which assigns values randomly.
IndomainRandom(int seed)
          It specifies Indomain function, which assigns values randomly.
 
Method Summary
 int indomain(IntVar var)
          It returns value within a variable which should be used in current assignment.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndomainRandom

public IndomainRandom()
It specifies Indomain function, which assigns values randomly.


IndomainRandom

public IndomainRandom(int seed)
It specifies Indomain function, which assigns values randomly.

Parameters:
seed - it specifies the seed of the random generator.
Method Detail

indomain

public int indomain(IntVar var)
Description copied from interface: Indomain
It returns value within a variable which should be used in current assignment. This function only returns value, it is not required to do any changes to variable, its domain, etc.

Specified by:
indomain in interface Indomain<T extends IntVar>
Parameters:
var - defines variable for which value for assignment is suggested.
Returns:
defines value for current assignment.