|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.math.AbstractVector
gov.llnl.ontology.util.MahoutSparseVector
public class MahoutSparseVector
A wrapper around an S-Space SparseDoubleVector into the Mahout style
vector.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.mahout.math.AbstractVector |
|---|
org.apache.mahout.math.AbstractVector.LocalElement |
| Nested classes/interfaces inherited from interface org.apache.mahout.math.Vector |
|---|
org.apache.mahout.math.Vector.Element |
| Field Summary |
|---|
| Fields inherited from class org.apache.mahout.math.AbstractVector |
|---|
lengthSquared |
| Constructor Summary | |
|---|---|
MahoutSparseVector(edu.ucla.sspace.vector.SparseDoubleVector vector)
Creates a new MahoutSparseVector from a SparseDoubleVector. |
|
MahoutSparseVector(edu.ucla.sspace.vector.SparseDoubleVector vector,
int length)
Creates a MahoutSparseVector from a given SparseDoubleVector with the given length. |
|
| Method Summary | |
|---|---|
int |
getNumNondefaultElements()
|
double |
getQuick(int index)
|
boolean |
isDense()
|
boolean |
isSequentialAccess()
|
Iterator<org.apache.mahout.math.Vector.Element> |
iterateNonZero()
|
Iterator<org.apache.mahout.math.Vector.Element> |
iterator()
|
org.apache.mahout.math.Vector |
like()
|
org.apache.mahout.math.Matrix |
matrixLike(int rows,
int columns)
|
void |
setQuick(int index,
double value)
|
| Methods inherited from class org.apache.mahout.math.AbstractVector |
|---|
addTo, aggregate, aggregate, asFormatString, assign, assign, assign, assign, assign, assign, clone, cross, divide, dot, dotSelf, equals, get, getDistanceSquared, getElement, getLengthSquared, hashCode, logNormalize, logNormalize, logNormalize, maxValue, maxValueIndex, minus, minValue, minValueIndex, norm, normalize, normalize, plus, plus, set, size, times, times, toString, viewPart, zSum |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MahoutSparseVector(edu.ucla.sspace.vector.SparseDoubleVector vector)
MahoutSparseVector from a SparseDoubleVector. The length will be either vector's
length, if it is not Integer.MAX_VALUE. Otherwise it will be the
last index in the non zero indices array.
public MahoutSparseVector(edu.ucla.sspace.vector.SparseDoubleVector vector,
int length)
MahoutSparseVector from a given SparseDoubleVector with the given length. length must be less
than the maximum length of vector.
| Method Detail |
|---|
public org.apache.mahout.math.Matrix matrixLike(int rows,
int columns)
matrixLike in class org.apache.mahout.math.AbstractVectorpublic int getNumNondefaultElements()
public void setQuick(int index,
double value)
public double getQuick(int index)
public org.apache.mahout.math.Vector like()
public Iterator<org.apache.mahout.math.Vector.Element> iterateNonZero()
public Iterator<org.apache.mahout.math.Vector.Element> iterator()
public boolean isSequentialAccess()
public boolean isDense()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||