|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.common.opres.nosum.NoSumList
public class NoSumList
A class mainly used in Pack Constraint. The algorithm checks if there is a sum of the candidate values between the given bounds.
Constructor Summary | |
---|---|
NoSumList(INoSumCell[] candidates)
The Constructor.We assume that the items are sorted in non increasing order. |
|
NoSumList(int[] candidates)
|
|
NoSumList(IntDomainVar[] candidates)
|
Method Summary | |
---|---|
void |
clear()
|
void |
fillCandidates()
|
int |
getCandidatesLoad()
Gets the candidates load. |
int |
getMaximumLoad()
Gets the candidates load. |
int |
getNbCandidates()
|
int |
getRequiredLoad()
Gets the required load. |
ListIterator<INoSumCell> |
listIterator()
|
boolean |
noSum(int alpha,
int beta)
No sum indicates the existence of a subset of candidate items which has a load between the parameters. |
void |
pack(int item)
|
void |
pack(ListIterator<INoSumCell> iter,
int item)
|
void |
packRemoved(int item)
|
void |
remove(int item)
|
void |
remove(ListIterator<INoSumCell> iter,
int item)
|
void |
setCandidatesFromVar(SetVar svar)
|
void |
undoRemove(ListIterator<INoSumCell> iter,
int item)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoSumList(INoSumCell[] candidates)
sizes
- public NoSumList(IntDomainVar[] candidates)
public NoSumList(int[] candidates)
Method Detail |
---|
public final void clear()
public final int getNbCandidates()
public final void fillCandidates()
public final void setCandidatesFromVar(SetVar svar)
public final int getCandidatesLoad()
public final int getRequiredLoad()
public final int getMaximumLoad()
public final void remove(int item)
public final void pack(int item)
public final ListIterator<INoSumCell> listIterator()
public final void remove(ListIterator<INoSumCell> iter, int item)
public final void pack(ListIterator<INoSumCell> iter, int item)
public final void undoRemove(ListIterator<INoSumCell> iter, int item)
public final void packRemoved(int item)
public boolean noSum(int alpha, int beta)
alpha
- the minimum load expectedbeta
- the maximum load expected
true
if it do not exist a subset of candidate items which has a load between alpha and beta.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |