Class IntDomainRandom

  • All Implemented Interfaces:
    IntValueSelector

    public class IntDomainRandom
    extends Object
    implements IntValueSelector
    Selects randomly a value in the variable domain. BEWARE: this should not be used within assignments and/or value removals if variables have a bounded domain.
    Since:
    2 juil. 2010
    Author:
    Charles Prud'homme
    • Constructor Detail

      • IntDomainRandom

        public IntDomainRandom​(long seed)
    • Method Detail

      • selectValue

        public int selectValue​(IntVar var)
        Selects and returns the value to constrained chosen variable with. The chosen value must belong to the domain of variable.
        Specified by:
        selectValue in interface IntValueSelector
        Returns:
        the value, based on the domain of variable