public interface IEnvironment
Modifier and Type | Method and Description |
---|---|
void |
buildFakeHistoryOn(ICondition condition)
Force to build fake history when a stored object on a particular condition.
|
boolean |
fakeHistoryNeeded() |
BasicIndexedBipartiteSet |
getSharedBipartiteSetForBooleanVars()
Factory pattern : shared IndexedBipartiteSet object is return by the environment
|
int |
getTimeStamp()
Return the current time stamp.
|
int |
getWorldIndex()
Returns the world number.
|
IStateBitSet |
makeBitSet(int size)
Factory pattern: new IStateBitSet objects are created by the environment
|
IStateBool |
makeBool(boolean initialValue)
Factory pattern: new IStateBool objects are created by the environment
|
IStateDoubleVector |
makeDoubleVector(int size,
double initialValue)
Factory pattern: new IStateDoubleVector objects are created by the environment
|
IStateDouble |
makeFloat()
Factory pattern: new StoredFloat objects are created by the environment
(no initial value is assigned to the backtrackable search)
|
IStateDouble |
makeFloat(double initialValue)
Factory pattern: new StoredFloat objects are created by the environment
|
IStateInt |
makeInt()
Factory pattern: new IStateInt objects are created by the environment
(no initial value is assigned to the backtrackable search)
|
IStateInt |
makeInt(int initialValue)
Factory pattern: new IStateInt objects are created by the environment
|
IStateIntVector |
makeIntVector(int size,
int initialValue)
Factory pattern: new IStateIntVector objects are created by the environment
|
IStateLong |
makeLong()
Factory pattern: new backtrackable long attached to this environment.
|
IStateLong |
makeLong(long init)
Factory pattern: new backtrackable long attached to this environment.
|
void |
save(IOperation operation)
Save this operation onto the stack of operations to undo on backtrack.
|
void |
worldCommit()
Comitting the current world: merging it with the previous one.
|
void |
worldPop()
Backtracks to the previous choice point in the search tree.
|
void |
worldPopUntil(int w)
Backtracks to the
w previous choice point in the tree search |
void |
worldPush()
Starts a new branch in the search tree.
|
int getWorldIndex()
void worldPush()
void worldPop()
void worldPopUntil(int w)
w
previous choice point in the tree searchw
- world index to pop tovoid worldCommit()
Not used yet.
void buildFakeHistoryOn(ICondition condition)
ICondition.FALSE
.condition
- to satisfy to build fake historyboolean fakeHistoryNeeded()
IStateBool makeBool(boolean initialValue)
initialValue
- the initial value of the backtrackable booleanIStateInt makeInt()
IStateInt makeInt(int initialValue)
initialValue
- the initial value of the backtrackable integerIStateDouble makeFloat()
IStateDouble makeFloat(double initialValue)
initialValue
- the initial value of the backtrackable searchIStateLong makeLong()
IStateLong makeLong(long init)
init
- its initial valueIStateBitSet makeBitSet(int size)
size
- initial size of the IStateBitSetIStateIntVector makeIntVector(int size, int initialValue)
size
- the number of entries in the vectorinitialValue
- the common initial value for all entries (backtrackable integers)IStateDoubleVector makeDoubleVector(int size, double initialValue)
size
- the number of entries in the vectorinitialValue
- the common initial value for all entries (backtrackable integers)BasicIndexedBipartiteSet getSharedBipartiteSetForBooleanVars()
void save(IOperation operation)
operation
- operation to undoint getTimeStamp()
Copyright © 2018. All rights reserved.