|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.structure.APartiallyStoredCstrList<C>
public abstract class APartiallyStoredCstrList<C extends SConstraint>
Field Summary | |
---|---|
protected PartiallyStoredVector<C> |
elements
|
protected PartiallyStoredIntVector |
indices
|
protected IStateInt |
priority
|
Constructor Summary | |
---|---|
protected |
APartiallyStoredCstrList(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. |
protected void |
computePriority(SConstraint c)
Compute the priotity of the variable |
int |
eraseConstraint(SConstraint c)
Removes (permanently) a constraint from the list of constraints connected to the variable. |
C |
getConstraint(int i)
Retrieve the C element i |
int |
getConstraintIndex(int constraintIndex)
Returns the index of the constraint. |
DisposableIterator<SConstraint> |
getConstraintsIterator()
This methods should be used if one want to access the different constraints stored. |
PartiallyStoredVector<C> |
getConstraintVector()
Access the data structure storing constraints |
PartiallyStoredIntVector |
getIndexVector()
Access the data structure storing indices associated to constraints . |
int |
getNbConstraints()
Returns the number of constraints |
int |
getPriority()
Return the minimum priority of the constraints in this |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final PartiallyStoredVector<C extends SConstraint> elements
protected final PartiallyStoredIntVector indices
protected final IStateInt priority
Constructor Detail |
---|
protected APartiallyStoredCstrList(IEnvironment env)
Method Detail |
---|
public final C getConstraint(int i)
i
- index of the constraint
public final int getConstraintIndex(int constraintIndex)
constraintIndex
- the index of the constraint
public final int getNbConstraints()
public final PartiallyStoredVector<C> getConstraintVector()
public final PartiallyStoredIntVector getIndexVector()
public int eraseConstraint(SConstraint c)
c
- the constraint that should be removed from the list this variable
maintains.
public int addConstraint(SConstraint c, int varIdx, boolean dynamicAddition)
c
- the constraint to addvarIdx
- the variable index accrding to the added constraintdynamicAddition
- states if the addition is definitic (cut) or
subject to backtracking (standard constraint)
protected void computePriority(SConstraint c)
c
- the new constraintpublic final DisposableIterator<SConstraint> getConstraintsIterator()
remove
method throws an
UnsupportedOperationException
.
public final int getPriority()
this
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |