choco.util
Class StoredPointerCycle

java.lang.Object
  extended by choco.util.StoredPointerCycle

Deprecated. Not used anymore !

public class StoredPointerCycle
extends java.lang.Object

A data structure implementing a subset of a given set, by means of a cyclic chain of pointers (grossly specking, each entry contains the index of the next entry in the cycle). This data structure is convenient for iterating a subset of objets (chain of pointers), starting from any object (cyclic iteration). The data structure is based on backtrackable vectors (@link{StoredIntVector}). It is also robust in the sense that objects can be removed from the cycle while the cycle is being iterated.


Field Summary
static int INVALID_INDEX
          Deprecated. Wildcard: all entries of the vector contain valid indices (i.e. values from 0 to n-1, n being the vector size) or the constant INVALID_INDEX.
protected static java.util.logging.Logger logger
          Deprecated. Reference to the root Logger, an object for logging trace statements related to propagation events (using the java.util.logging package).
protected  StoredIntVector next
          Deprecated. The vectors of entries.
 
Constructor Summary
StoredPointerCycle(Environment env)
          Deprecated. Builds the data structure with the specified environment.
 
Method Summary
 void add(int idx, boolean inCycle)
          Deprecated. Adds an entry to the static collection, at a given index.
 IntIterator getCycleButIterator(int avoidIndex)
          Deprecated. Builds an iterator to enumerate all indices except one.
 boolean isInCycle(int idx)
          Deprecated. Tests if a given index is in the cycle or not.
 void setInCycle(int i)
          Deprecated. Sets the index into the cycle.
 void setOutOfCycle(int i)
          Deprecated. Sets the index into the cycle.
 int size()
          Deprecated. Compute the size of the data structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_INDEX

public static final int INVALID_INDEX
Deprecated. 
Wildcard: all entries of the vector contain valid indices (i.e. values from 0 to n-1, n being the vector size) or the constant INVALID_INDEX.

See Also:
Constant Field Values

next

protected StoredIntVector next
Deprecated. 
The vectors of entries.


logger

protected static java.util.logging.Logger logger
Deprecated. 
Reference to the root Logger, an object for logging trace statements related to propagation events (using the java.util.logging package).

Constructor Detail

StoredPointerCycle

public StoredPointerCycle(Environment env)
Deprecated. 
Builds the data structure with the specified environment.

Parameters:
env - The environment responsible of managing worlds
Method Detail

size

public int size()
Deprecated. 
Compute the size of the data structure.

Returns:
the number of elements

isInCycle

public boolean isInCycle(int idx)
Deprecated. 
Tests if a given index is in the cycle or not.

Parameters:
idx - The index to be checked
Returns:
true is the index is in the cycle

add

public void add(int idx,
                boolean inCycle)
Deprecated. 
Adds an entry to the static collection, at a given index.

Parameters:
idx - where the entry should be added
inCycle - Specifies if the new entry is in the cycle

setInCycle

public void setInCycle(int i)
Deprecated. 
Sets the index into the cycle.

Parameters:
i - the index to add

setOutOfCycle

public void setOutOfCycle(int i)
Deprecated. 
Sets the index into the cycle.

Parameters:
i - removes an index from the cycle

getCycleButIterator

public IntIterator getCycleButIterator(int avoidIndex)
Deprecated. 
Builds an iterator to enumerate all indices except one.

Parameters:
avoidIndex - the index to exclude
Returns:
the built iterator