Class IndomainList<T extends IntVar>

  • All Implemented Interfaces:
    Indomain<T>

    public class IndomainList<T extends IntVar>
    extends java.lang.Object
    implements Indomain<T>
    IndomainList - implements enumeration method based on the selection of the preferred values for each variable. The preferred values are specified as an ordered list of values. The values will be selected in the order specified by this list. If the non of the values from the list is present in the current domain a default indomain method will be used.
    Version:
    4.7
    • Constructor Summary

      Constructors 
      Constructor Description
      IndomainList​(int[] order, Indomain<T> defIndomain)
      It creates an IndomainList heuristic for choosing the values.
    • 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

      • order

        private int[] order
    • Constructor Detail

      • IndomainList

        public IndomainList​(int[] order,
                            Indomain<T> defIndomain)
        It creates an IndomainList heuristic for choosing the values.
        Parameters:
        order - the order of values used to decide which values goes first.
        defIndomain - the default indomain used if some values are not specified by the order array.
    • Method Detail

      • indomain

        public int indomain​(T var)
                     throws java.lang.RuntimeException
        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.
        Throws:
        java.lang.RuntimeException