|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.AbstractVector
org.apache.mahout.math.AbstractMatrix.TransposeViewVector
protected class AbstractMatrix.TransposeViewVector
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.mahout.math.Vector |
---|
Vector.Element |
Field Summary |
---|
Fields inherited from class org.apache.mahout.math.AbstractVector |
---|
lengthSquared, size |
Constructor Summary | |
---|---|
protected |
AbstractMatrix.TransposeViewVector(Matrix m,
int offset)
|
protected |
AbstractMatrix.TransposeViewVector(Matrix m,
int offset,
boolean rowToColumn)
|
Method Summary | |
---|---|
Vector |
clone()
Return a copy of the recipient |
Vector.Element |
getElement(int i)
Return an object of Vector.Element representing an element of this Vector. |
int |
getNumNondefaultElements()
TODO: currently I don't know of an efficient way to getVector this value correctly. |
double |
getQuick(int index)
Return the value at the given index, without checking bounds |
java.util.Iterator<Vector.Element> |
iterateAll()
Iterates over all elements * NOTE: Implementations may choose to reuse the Element returned for performance reasons, so if you need a copy of it, you should call Vector.getElement(int) for the given index |
java.util.Iterator<Vector.Element> |
iterateNonZero()
Currently delegates to iterateAll. |
Vector |
like()
Return an empty matrix of the same underlying class as the receiver |
Vector |
like(int cardinality)
Return an empty matrix of the same underlying class as the receiver and of the given cardinality |
protected Matrix |
matrixLike(int rows,
int columns)
Subclasses must override to return an appropriately sparse or dense result |
protected Vector |
newVector(int cardinality)
|
void |
setQuick(int index,
double value)
Set the value at the given index, without checking bounds |
Methods inherited from class org.apache.mahout.math.AbstractVector |
---|
addTo, aggregate, aggregate, asFormatString, assign, assign, assign, assign, assign, assign, cross, decodeVector, divide, dot, dotSelf, equivalent, get, get, getDistanceSquared, getLabelBindings, getLengthSquared, getName, hashCode, maxValue, maxValueIndex, minus, norm, normalize, normalize, plus, plus, set, set, set, setLabelBindings, setName, size, strictEquivalence, times, times, viewPart, zSum |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractMatrix.TransposeViewVector(Matrix m, int offset)
protected AbstractMatrix.TransposeViewVector(Matrix m, int offset, boolean rowToColumn)
Method Detail |
---|
public Vector clone()
Vector
clone
in interface Vector
clone
in class AbstractVector
protected Matrix matrixLike(int rows, int columns)
AbstractVector
matrixLike
in class AbstractVector
rows
- the row cardinalitycolumns
- the column cardinality
public java.util.Iterator<Vector.Element> iterateAll()
Vector
Vector.getElement(int)
for the given index
Iterator
over all elementspublic java.util.Iterator<Vector.Element> iterateNonZero()
public Vector.Element getElement(int i)
Vector
i
- Index of the Vector.Element required
public double getQuick(int index)
Vector
index
- an int index
public void setQuick(int index, double value)
Vector
index
- an int index into the receivervalue
- a double value to setprotected Vector newVector(int cardinality)
public Vector like()
Vector
public Vector like(int cardinality)
Vector
cardinality
- an int specifying the desired cardinality
public int getNumNondefaultElements()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |