|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.spi.solver.ChoicePointMultiDoubleArray
Contains multiple double arrays that store data for an object that needs to record changes in a
ChoicePointStack
so the changes can be pushed onto the stack and
later rolled back when the stack is popped.
This class is not thread safe.
Constructor Summary | |
ChoicePointMultiDoubleArray(int listCnt)
Creates a new ChoicePointMultiDoubleArray |
Method Summary | |
int |
add(int listIdx,
double val)
Adds a value to the end of the list |
double |
get(int listIdx,
int offset)
Retrieves a value in list |
void |
pop()
Performs actions necessary to pop data |
java.lang.Object |
popDelta()
|
void |
push()
Performs actions necessary to push data |
void |
pushDelta(java.lang.Object delta)
|
double |
remove(int listIdx,
int offset)
Retrieves a value from list |
void |
set(int listIdx,
int offset,
double val)
Stores a value in list |
int |
size()
Returns current size of list |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChoicePointMultiDoubleArray(int listCnt)
ChoicePointMultiDoubleArray
listCnt
- Number of lists to maintainMethod Detail |
public void push()
push
in interface ChoicePointNumArraySet.StackList
public void pushDelta(java.lang.Object delta)
pushDelta
in interface ChoicePointNumArraySet.StackList
public void pop()
pop
in interface ChoicePointNumArraySet.StackList
public java.lang.Object popDelta()
popDelta
in interface ChoicePointNumArraySet.StackList
public int size()
public int add(int listIdx, double val)
listIdx
- Index of list to add valueval
- Value to add to list
public void set(int listIdx, int offset, double val)
listIdx
- Index of list to add valueoffset
- Offset of value in listval
- Value to append to the listpublic double get(int listIdx, int offset)
listIdx
- Index of list to add valueoffset
- Offset of value in listpublic double remove(int listIdx, int offset)
listIdx
- Index of list to add valueoffset
- Offset of value in list
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |