Interface SelectChoicePoint<T extends Var>

    • Method Detail

      • getChoiceVariable

        T getChoiceVariable​(int index)
        It returns the variable which is the base on the next choice point. Only if choice is of an X = C type. This function returns null if all variables have a value assigned or a choice point based on other type of constraint is being selected. The parameter index is the last variable which have been return by this SelectChoicePoint object which has not been backtracked upon yet.
        Parameters:
        index - the position of the last variable in selection choice point heuristic.
        Returns:
        variable based on which the choice needs to be created.
      • getChoiceValue

        int getChoiceValue()
        It returns a value which is the base of the next choice point. Only if choice is of an getChoiceVariable() = getChoiceValue() type.
        Returns:
        value used in the choice point (value).
      • getChoiceConstraint

        PrimitiveConstraint getChoiceConstraint​(int index)
        It returns the constraint which is the base of the choice point. If the return value is equal to null and choice point is also not based on X = C type of constraint then all variables have been assigned a value.
        Parameters:
        index - the position of the last variable returned by selection choice point heuristic.
        Returns:
        primitive constraint which is a base of a choice point.
      • getVariablesMapping

        java.util.Map<T,​java.lang.Integer> getVariablesMapping()
        It specifies the position of variables as given when variables of this select object were supplied.
        Returns:
        mapping of variables to the positions in the variables array.
      • getIndex

        int getIndex()
        It returns the current index. Supplying this value in the next invocation of select will make search for next variable faster without compromising efficiency.
        Returns:
        internal position of the last variable chosen to be the base of the choice point.