public interface VectorIterable extends Iterable<MatrixSlice>
Modifier and Type | Method and Description |
---|---|
Iterator<MatrixSlice> |
iterateAll() |
Iterator<MatrixSlice> |
iterateNonEmpty() |
int |
numCols() |
int |
numRows() |
int |
numSlices() |
Vector |
times(Vector v)
Return a new vector with cardinality equal to getNumRows() of this matrix which is the matrix product of the
recipient and the argument
|
Vector |
timesSquared(Vector v)
Convenience method for producing this.transpose().times(this.times(v)), which can be implemented with only one pass
over the matrix, without making the transpose() call (which can be expensive if the matrix is sparse)
|
forEach, iterator, spliterator
Iterator<MatrixSlice> iterateAll()
Iterator<MatrixSlice> iterateNonEmpty()
int numSlices()
int numRows()
int numCols()
Vector times(Vector v)
v
- a vector with cardinality equal to getNumCols() of the recipientCardinalityException
- if this.getNumRows() != v.size()Vector timesSquared(Vector v)
v
- a vector with cardinality equal to getNumCols() of the recipientCardinalityException
- if this.getNumCols() != v.size()Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.