choco.kernel.memory.structure
Class PartiallyStoredIntVector
java.lang.Object
choco.kernel.memory.structure.PartiallyStoredIntVector
public final class PartiallyStoredIntVector
- extends Object
A class implementing a vector with two kind of storage:
standard static storage in an array, and backtrackable storage.
By convention, integers with small indices (0 .. 999999) are statically managed
as if they were in a standard array.
And integers with large indices (1000000 ... ) are "stored" in a backtrackable
manner, as if they were in a StoredIntVector
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PartiallyStoredIntVector
public PartiallyStoredIntVector(IEnvironment env)
staticAdd
public int staticAdd(int o)
ensureStaticCapacity
public void ensureStaticCapacity(int n)
add
public int add(int o)
remove
public void remove(int o)
ensureStoredCapacity
public void ensureStoredCapacity(int n)
get
public int get(int index)
isEmpty
public boolean isEmpty()
size
public int size()
getIndexIterator
public DisposableIntIterator getIndexIterator()
isStaticIndex
public static boolean isStaticIndex(int idx)
getSmallIndex
public static int getSmallIndex(int idx)
getGlobalIndex
public static int getGlobalIndex(int idx,
boolean isStatic)
Copyright © 2012. All Rights Reserved.