nz.ac.waikato.mcennis.rat.reusablecores.datavector
Class SparseListMapDataVector.LeftVector

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.reusablecores.datavector.SparseListMapDataVector.LeftVector
All Implemented Interfaces:
java.lang.Comparable, DataVector
Enclosing class:
SparseListMapDataVector

public class SparseListMapDataVector.LeftVector
extends java.lang.Object
implements DataVector

Class implementing a list data vector. Extremely slow (linear) random access times.


Constructor Summary
SparseListMapDataVector.LeftVector()
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.Comparable getCurrentIndex()
          return the index at the current position of the iterator
 double getCurrentValue()
          return the value at the current position of the iterator.
 double getValue(java.lang.Comparable index)
          Get the value at the given index.
 boolean hasNext()
          Does the vector contain any additional non-zero values?
 void next()
          Move the iterator to the next non-zero index-value pair
 void reset()
          Reset the iterator to the first index of the function, potentially creating a new ordering of objects on some data vectors (i.e.
 void setSize(int s)
          Set the dimensionality of this vector
 int size()
          Returns the number of dimensions of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparseListMapDataVector.LeftVector

public SparseListMapDataVector.LeftVector()
Method Detail

size

public int size()
Description copied from interface: DataVector
Returns the number of dimensions of this object. This is frequently not the number of non-zero entries.

Specified by:
size in interface DataVector
Returns:
dimension of the vector.

setSize

public void setSize(int s)
Description copied from interface: DataVector
Set the dimensionality of this vector

Specified by:
setSize in interface DataVector
Parameters:
s - dimensionality of the vector

getValue

public double getValue(java.lang.Comparable index)
Description copied from interface: DataVector
Get the value at the given index. Note that this need not be an integer. Some classes require integer values and will throw an exception if the object does not convert into an integer.

Specified by:
getValue in interface DataVector
Parameters:
index - index of the desired value
Returns:
value at the given index

reset

public void reset()
Description copied from interface: DataVector
Reset the iterator to the first index of the function, potentially creating a new ordering of objects on some data vectors (i.e. HashMap objects).

Specified by:
reset in interface DataVector

getCurrentValue

public double getCurrentValue()
Description copied from interface: DataVector
return the value at the current position of the iterator.

Specified by:
getCurrentValue in interface DataVector
Returns:
current value

getCurrentIndex

public java.lang.Comparable getCurrentIndex()
Description copied from interface: DataVector
return the index at the current position of the iterator

Specified by:
getCurrentIndex in interface DataVector
Returns:

next

public void next()
Description copied from interface: DataVector
Move the iterator to the next non-zero index-value pair

Specified by:
next in interface DataVector

hasNext

public boolean hasNext()
Description copied from interface: DataVector
Does the vector contain any additional non-zero values?

Specified by:
hasNext in interface DataVector
Returns:
are there values left.

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads