choco.kernel.memory
Interface IStateDoubleVector

All Known Implementing Classes:
RcDoubleVector, StoredDoubleVector

public interface IStateDoubleVector

Describes an search vector with states (describing some history of the data structure).


Field Summary
static Logger LOGGER
           
static int MIN_CAPACITY
          Minimal capacity of a vector
 
Method Summary
 void add(double i)
          Adds a new search at the end of the vector.
 double get(int index)
          Returns the indexth element of the vector.
 DisposableIntIterator getIterator()
           
 boolean isEmpty()
          Checks if the vector is empty.
 double quickGet(int index)
          return the indexth element of the vector without an bound check.
 double quickSet(int index, double val)
          Unsafe setter => don't do bound verification
 void remove(int i)
          Removes an int.
 void removeLast()
          removes the search at the end of the vector.
 double set(int index, double val)
          Assigns a new value val to the element index and returns the old value
 int size()
          Returns the current size of the stored search vector.
 

Field Detail

LOGGER

static final Logger LOGGER

MIN_CAPACITY

static final int MIN_CAPACITY
Minimal capacity of a vector

See Also:
Constant Field Values
Method Detail

size

int size()
Returns the current size of the stored search vector.


isEmpty

boolean isEmpty()
Checks if the vector is empty.


add

void add(double i)
Adds a new search at the end of the vector.

Parameters:
i - The search to add.

remove

void remove(int i)
Removes an int.

Parameters:
i - The search to remove.

removeLast

void removeLast()
removes the search at the end of the vector. does nothing when called on an empty vector


get

double get(int index)
Returns the indexth element of the vector.


quickGet

double quickGet(int index)
return the indexth element of the vector without an bound check.

Parameters:
index - index
Returns:
the element

set

double set(int index,
           double val)
Assigns a new value val to the element index and returns the old value


quickSet

double quickSet(int index,
                double val)
Unsafe setter => don't do bound verification

Parameters:
index - the index of the replaced value
val - the new value
Returns:
the old value

getIterator

DisposableIntIterator getIterator()


Copyright © 2012. All Rights Reserved.