|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.sourceforge.combean.mathprog.linalg.SparseDoubleVector
public class SparseDoubleVector
A simple implementation of a sparse vector of doubles, consisting of an array of doubles values and an array of int indices.
| Constructor Summary | |
|---|---|
SparseDoubleVector(int dimension,
int[] indices,
double[] values)
Constructor. |
|
SparseDoubleVector(int dimension,
int index,
double value)
Constructor for a sparse vector with a single non-zero element. |
|
| Method Summary | |
|---|---|
int |
getDimension()
Get the dimension of the vector. |
int[] |
getIndices()
|
int |
getNumIterations()
Return the number of entries of the vector through which the iterator returned by getIterator() iterates. |
double[] |
getValues()
|
VectorIterator<NoLabel> |
iterator()
Get an iterator which iterates through all non-zero entries of the vector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SparseDoubleVector(int dimension,
int[] indices,
double[] values)
values - indices -
public SparseDoubleVector(int dimension,
int index,
double value)
dimension - the dimension of the vector.index - the index of the non-zero element.value - the value of the non-zero element.| Method Detail |
|---|
public int getDimension()
SparseVector
getDimension in interface SparseVectorpublic VectorIterator<NoLabel> iterator()
SparseVec
iterator in interface SparseVec<NoLabel>public int getNumIterations()
SparseVec
getNumIterations in interface SparseVec<NoLabel>public final int[] getIndices()
public final double[] getValues()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||