choco.kernel.memory.structure
Class PartiallyStoredIntVector

java.lang.Object
  extended by 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


Constructor Summary
PartiallyStoredIntVector(IEnvironment env)
           
 
Method Summary
 int add(int o)
           
 void ensureStaticCapacity(int n)
           
 void ensureStoredCapacity(int n)
           
 int get(int index)
           
static int getGlobalIndex(int idx, boolean isStatic)
           
 DisposableIntIterator getIndexIterator()
           
static int getSmallIndex(int idx)
           
 boolean isEmpty()
           
static boolean isStaticIndex(int idx)
           
 void remove(int o)
           
 int size()
           
 int staticAdd(int o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartiallyStoredIntVector

public PartiallyStoredIntVector(IEnvironment env)
Method Detail

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.