Class Occurrence<V extends Variable>

  • All Implemented Interfaces:
    VariableEvaluator<V>, VariableSelector<V>

    public class Occurrence<V extends Variable>
    extends Object
    implements VariableSelector<V>, VariableEvaluator<V>
    Occurrence variable selector. It chooses the variable with the largest number of attached propagators (instantiated variables are ignored).
    TODO: could be based on the number of not entailed propagators
    2 juil. 2010
    Charles Prud'homme
    • Constructor Detail

      • Occurrence

        public Occurrence()
    • Method Detail

      • getVariable

        public V getVariable​(V[] 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<V extends Variable>
        the current selected variable if any, null otherwise.
      • evaluate

        public double evaluate​(V 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<V extends Variable>
        variable - array of variable
        the result of the evaluation, to minimize