public class EnvironmentTrailing extends AbstractEnvironment
Modifier and Type | Field and Description |
---|---|
static double |
LOADFACTOR
The load factor to update
IStorage . |
static int |
NBUPATES
The maximum numbers of updates that a
IStorage can handle. |
static int |
NBWORLDS
The maximum numbers of worlds that a
IStorage can handle. |
currentWorld, timestamp
Constructor and Description |
---|
EnvironmentTrailing() |
Modifier and Type | Method and Description |
---|---|
IStoredBoolTrail |
getBoolTrail() |
IStoredDoubleTrail |
getDoubleTrail() |
StoredDoubleVectorTrail |
getDoubleVectorTrail() |
IStoredIntTrail |
getIntTrail() |
StoredIntVectorTrail |
getIntVectorTrail() |
IStoredLongTrail |
getLongTrail() |
IOperationTrail |
getOperationTrail() |
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 oldValue)
Save this operation onto the stack of operations to undo on backtrack.
|
void |
setBoolTrail(IStoredBoolTrail btrail) |
void |
setDoubleTrail(IStoredDoubleTrail dtrail) |
void |
setIntTrail(IStoredIntTrail itrail) |
void |
setLongTrail(IStoredLongTrail ltrail) |
void |
setOperationTrail(IOperationTrail otrail) |
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 |
worldPush()
Starts a new branch in the search tree.
|
buildFakeHistoryOn, fakeHistoryNeeded, getSharedBipartiteSetForBooleanVars, getTimeStamp, getWorldIndex, makeBitSet, worldPopUntil
public static final int NBWORLDS
IStorage
can handle.public static final int NBUPATES
IStorage
can handle.public static final double LOADFACTOR
IStorage
.public void worldPush()
public void worldPop()
public void worldCommit()
Not used yet.
public IStateInt makeInt()
public IStateInt makeInt(int initialValue)
initialValue
- the initial value of the backtrackable integerpublic IStateBool makeBool(boolean initialValue)
initialValue
- the initial value of the backtrackable booleanpublic IStateIntVector makeIntVector(int size, int initialValue)
size
- the number of entries in the vectorinitialValue
- the common initial value for all entries (backtrackable integers)public IStateDoubleVector makeDoubleVector(int size, double initialValue)
size
- the number of entries in the vectorinitialValue
- the common initial value for all entries (backtrackable integers)public IStateDouble makeFloat()
public IStateDouble makeFloat(double initialValue)
initialValue
- the initial value of the backtrackable searchpublic IStateLong makeLong()
public IStateLong makeLong(long init)
init
- its initial valuepublic void setIntTrail(IStoredIntTrail itrail)
public IStoredIntTrail getIntTrail()
public void setLongTrail(IStoredLongTrail ltrail)
public IStoredLongTrail getLongTrail()
public void setBoolTrail(IStoredBoolTrail btrail)
public IStoredBoolTrail getBoolTrail()
public void setDoubleTrail(IStoredDoubleTrail dtrail)
public IStoredDoubleTrail getDoubleTrail()
public void setOperationTrail(IOperationTrail otrail)
public IOperationTrail getOperationTrail()
public StoredIntVectorTrail getIntVectorTrail()
public StoredDoubleVectorTrail getDoubleVectorTrail()
public void save(IOperation oldValue)
IEnvironment
oldValue
- operation to undoCopyright © 2018. All rights reserved.