choco.kernel.memory.structure
Class PartiallyStoredIntCstrList<C extends AbstractSConstraint>

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

public final class PartiallyStoredIntCstrList<C extends AbstractSConstraint>
extends APartiallyStoredCstrList<C>


Field Summary
 
Fields inherited from class choco.kernel.memory.structure.APartiallyStoredCstrList
elements, indices, priority
 
Constructor Summary
PartiallyStoredIntCstrList(IEnvironment env, int... eventTypes)
           
 
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(int event, 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

PartiallyStoredIntCstrList

public PartiallyStoredIntCstrList(IEnvironment env,
                                  int... eventTypes)
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>
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>
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(int event,
                                                         C cstrCause)


Copyright © 2012. All Rights Reserved.