|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.AbstractEnvironment
choco.kernel.memory.trailing.EnvironmentTrailing
public final class EnvironmentTrailing
The root class for managing memory and sessions.
A environment is associated to each problem. It is responsible for managing backtrackable data.
Field Summary |
---|
Fields inherited from class choco.kernel.memory.AbstractEnvironment |
---|
currentBitSet, currentWorld, nextOffset |
Fields inherited from interface choco.kernel.memory.IEnvironment |
---|
LOGGER |
Constructor Summary | |
---|---|
EnvironmentTrailing()
Constructs a new IEnvironment with
the default stack sizes : 50000 and 1000. |
Method Summary | ||
---|---|---|
void |
clear()
Clear the entire internal structures |
|
StoredBinaryTreeTrail |
getBinaryTreeTrail()
|
|
protected StoredBoolTrail |
getBoolTrail()
|
|
protected StoredDoubleTrail |
getDoubleTrail()
|
|
protected StoredDoubleVectorTrail |
getDoubleVectorTrail()
|
|
protected StoredIntTrail |
getIntTrail()
|
|
protected StoredIntVectorTrail |
getIntVectorTrail()
|
|
protected StoredLongTrail |
getLongTrail()
|
|
protected StoredLongVectorTrail |
getLongVectorTrail()
|
|
int |
getTrailSize()
|
|
protected StoredVectorTrail |
getVectorTrail()
|
|
IStateBinaryTree |
makeBinaryTree(int inf,
int sup)
|
|
IStateBool |
makeBool(boolean initialValue)
Factory pattern: new IStateBool objects are created by the environment |
|
IStateDoubleVector |
makeDoubleVector()
Factory pattern: new IStateDoubleVector objects are created by the environment. |
|
IStateDoubleVector |
makeDoubleVector(double[] entries)
Factory pattern: new IStateDoubleVector 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 |
|
IStateInt |
makeIntProcedure(IStateIntProcedure procedure,
int initialValue)
Factory pattern : new IStateInt with procedure objects are created by the environment |
|
IStateIntVector |
makeIntVector()
Factory pattern: new IStateIntVector objects are created by the environment. |
|
IStateIntVector |
makeIntVector(int[] entries)
Factory pattern: new IStateIntVector objects are created by the environment |
|
IStateIntVector |
makeIntVector(int size,
int initialValue)
Factory pattern: new IStateIntVector objects are created by the environment |
|
IStateLong |
makeLong()
|
|
IStateLong |
makeLong(int init)
|
|
IStateLongVector |
makeLongVector()
Factory pattern: new IStateIntVector objects are created by the environment. |
|
IStateLongVector |
makeLongVector(int size,
long initialValue)
Factory pattern: new IStateIntVector objects are created by the environment |
|
IStateLongVector |
makeLongVector(long[] entries)
Factory pattern: new IStateIntVector objects are created by the environment |
|
IStateObject |
makeObject(Object obj)
|
|
|
makeVector()
Factory pattern: new IStateVector objects are created by the environment. |
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnvironmentTrailing()
IEnvironment
with
the default stack sizes : 50000 and 1000.
Method Detail |
---|
public void worldPush()
IEnvironment
public void worldPop()
IEnvironment
public void worldCommit()
IEnvironment
public void clear()
IEnvironment
public IStateInt makeInt()
IEnvironment
public IStateInt makeInt(int initialValue)
IEnvironment
initialValue
- the initial value of the backtrackable integer
public IStateInt makeIntProcedure(IStateIntProcedure procedure, int initialValue)
IEnvironment
procedure
- the procedure to applyinitialValue
- the intial value of the integer
public IStateBool makeBool(boolean initialValue)
IEnvironment
initialValue
- the initial value of the backtrackable boolean
public IStateIntVector makeIntVector()
IEnvironment
public IStateIntVector makeIntVector(int size, int initialValue)
IEnvironment
size
- the number of entries in the vectorinitialValue
- the common initial value for all entries (backtrackable integers)
public IStateIntVector makeIntVector(int[] entries)
IEnvironment
entries
- an array to be copied as set of initial contents of the vector
public IStateLongVector makeLongVector()
IEnvironment
public IStateLongVector makeLongVector(int size, long initialValue)
IEnvironment
size
- the number of entries in the vectorinitialValue
- the common initial value for all entries (backtrackable integers)
public IStateLongVector makeLongVector(long[] entries)
IEnvironment
entries
- an array to be copied as set of initial contents of the vector
public IStateDoubleVector makeDoubleVector()
IEnvironment
public IStateDoubleVector makeDoubleVector(int size, double initialValue)
IEnvironment
size
- the number of entries in the vectorinitialValue
- the common initial value for all entries (backtrackable integers)
public IStateDoubleVector makeDoubleVector(double[] entries)
IEnvironment
entries
- an array to be copied as set of initial contents of the vector
public <T> IStateVector<T> makeVector()
IEnvironment
public IStateDouble makeFloat()
IEnvironment
public IStateDouble makeFloat(double initialValue)
IEnvironment
initialValue
- the initial value of the backtrackable searchpublic IStateBinaryTree makeBinaryTree(int inf, int sup)
public IStateLong makeLong()
public IStateLong makeLong(int init)
public IStateObject makeObject(Object obj)
public int getTrailSize()
protected StoredIntTrail getIntTrail()
protected StoredLongTrail getLongTrail()
protected StoredBoolTrail getBoolTrail()
protected StoredDoubleTrail getDoubleTrail()
protected StoredVectorTrail getVectorTrail()
protected StoredIntVectorTrail getIntVectorTrail()
protected StoredDoubleVectorTrail getDoubleVectorTrail()
protected StoredLongVectorTrail getLongVectorTrail()
public StoredBinaryTreeTrail getBinaryTreeTrail()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |