Class IndomainSetRandom<T extends SetVar>

  • Type Parameters:
    T - type of variable being used in search.
    All Implemented Interfaces:
    Indomain<T>

    public class IndomainSetRandom<T extends SetVar>
    extends java.lang.Object
    implements Indomain<T>
    IndomainMin - implements enumeration method based on the selection of the maximal value in the domain of variable
    Version:
    4.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.Random seed  
    • Constructor Summary

      Constructors 
      Constructor Description
      IndomainSetRandom()
      It creates random indomain heuristic with randomly generated seed for random generated.
      IndomainSetRandom​(java.util.Random seed)
      It creates random indomain heuristic according to the provided random generator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int indomain​(T var)
      It returns value within a variable which should be used in current assignment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • seed

        java.util.Random seed
    • Constructor Detail

      • IndomainSetRandom

        public IndomainSetRandom()
        It creates random indomain heuristic with randomly generated seed for random generated.
      • IndomainSetRandom

        public IndomainSetRandom​(java.util.Random seed)
        It creates random indomain heuristic according to the provided random generator.
        Parameters:
        seed - seed for random number genrator
    • Method Detail

      • indomain

        public int indomain​(T 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 SetVar>
        Parameters:
        var - defines variable for which value for assignment is suggested.
        Returns:
        defines value for current assignment.