choco.kernel.memory.structure
Class PartiallyStoredTaskCstrList<C extends AbstractSConstraint & TaskPropagator>

java.lang.Object
  extended by choco.kernel.memory.structure.APartiallyStoredCstrList<C>
      extended by choco.kernel.memory.structure.PartiallyStoredTaskCstrList<C>

public final class PartiallyStoredTaskCstrList<C extends AbstractSConstraint & TaskPropagator>
extends APartiallyStoredCstrList<C>


Field Summary
 
Fields inherited from class choco.kernel.memory.structure.APartiallyStoredCstrList
elements, indices
 
Constructor Summary
PartiallyStoredTaskCstrList(IEnvironment env)
           
 
Method Summary
 int addConstraint(SConstraint c, int varIdx, boolean dynamicAddition)
          Adds a new constraints on the stack of constraints the addition can be dynamic (undone upon backtracking) or not.
 int eraseConstraint(SConstraint c)
          Removes (permanently) a constraint from the list of constraints connected to the variable.
 DisposableIterator<Couple<C>> getActiveConstraint(C cstrCause)
           
 PartiallyStoredIntVector getEventsVector()
           
 
Methods inherited from class choco.kernel.memory.structure.APartiallyStoredCstrList
computePriority, getConstraint, getConstraintIndex, getConstraintsIterator, getConstraintVector, getIndexVector, getNbConstraints, getPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartiallyStoredTaskCstrList

public PartiallyStoredTaskCstrList(IEnvironment env)
Method Detail

addConstraint

public int addConstraint(SConstraint c,
                         int varIdx,
                         boolean dynamicAddition)
Adds a new constraints on the stack of constraints the addition can be dynamic (undone upon backtracking) or not.

Overrides:
addConstraint in class APartiallyStoredCstrList<C extends AbstractSConstraint & TaskPropagator>
Parameters:
c - the constraint to add
varIdx - the variable index accrding to the added constraint
dynamicAddition - states if the addition is definitic (cut) or subject to backtracking (standard constraint)
Returns:
the index affected to the constraint according to this variable

eraseConstraint

public int eraseConstraint(SConstraint c)
Removes (permanently) a constraint from the list of constraints connected to the variable.

Overrides:
eraseConstraint in class APartiallyStoredCstrList<C extends AbstractSConstraint & TaskPropagator>
Parameters:
c - the constraint that should be removed from the list this variable maintains.
Returns:
index of the deleted constraint

getEventsVector

public PartiallyStoredIntVector getEventsVector()

getActiveConstraint

public DisposableIterator<Couple<C>> getActiveConstraint(C cstrCause)


Copyright © 2012. All Rights Reserved.