|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnz.ac.waikato.mcennis.rat.reusablecores.datavector.MapDataVector
public class MapDataVector
Data vector backed by a maps.
| Constructor Summary | |
|---|---|
MapDataVector(java.util.Map<? extends java.lang.Comparable,java.lang.Double> source,
int size)
Create a new data vector from a map. |
|
| 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 |
|---|
public MapDataVector(java.util.Map<? extends java.lang.Comparable,java.lang.Double> source,
int size)
source - source datasize - number of dimensions| Method Detail |
|---|
public int size()
DataVector
size in interface DataVectorpublic void setSize(int s)
DataVector
setSize in interface DataVectors - dimensionality of the vectorpublic double getValue(java.lang.Comparable index)
DataVector
getValue in interface DataVectorindex - index of the desired value
public void reset()
DataVector
reset in interface DataVectorpublic double getCurrentValue()
DataVector
getCurrentValue in interface DataVectorpublic java.lang.Comparable getCurrentIndex()
DataVector
getCurrentIndex in interface DataVectorpublic void next()
DataVector
next in interface DataVectorpublic boolean hasNext()
DataVector
hasNext in interface DataVectorpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||