Class RandomVar<T extends Variable>

    • Constructor Detail

      • RandomVar

        public RandomVar​(long seed,
                         IntVar[] scope)
        Random variable selector & evaluator more efficient with fast restart
        Parameters:
        seed - seed for random number generator.
        scope - variables to branch on, must not be empty
    • Method Detail

      • getVariable

        public T getVariable​(T[] variables)
        Description copied from interface: VariableSelector
        Provides access to the current selected variable among variables. If there is no variable left, return null.
        Specified by:
        getVariable in interface VariableSelector<T extends Variable>
        Returns:
        the current selected variable if any, null otherwise.
      • evaluate

        public double evaluate​(T variable)
        Description copied from interface: VariableEvaluator
        Evaluates the heuristic that is minimized in order to find the best variable
        Specified by:
        evaluate in interface VariableEvaluator<T extends Variable>
        Parameters:
        variable - array of variable
        Returns:
        the result of the evaluation, to minimize