## org.apache.mahout.math
Interface VectorIterable

All Superinterfaces:
  Iterable<MatrixSlice>

All Known Subinterfaces:
  Matrix

All Known Implementing Classes:
  AbstractMatrix, DenseMatrix, DenseSymmetricMatrix, DiagonalMatrix, FileBasedMatrix, FileBasedSparseBinaryMatrix, MatrixView, PivotedMatrix, RandomTrinaryMatrix, SparseColumnMatrix, SparseMatrix, SparseRowMatrix, UpperTriangular

    public interface VectorIterable

extends Iterable<MatrixSlice>

Method Summary
`Iterator<MatrixSlice>` `iterateAll()`
`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)

Methods inherited from interface java.lang.Iterable
`iterator`

Method Detail

### iterateAll

    Iterator<MatrixSlice> iterateAll()

### numSlices

    int numSlices()

### numRows

    int numRows()

### numCols

    int numCols()

### times

    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

  Parameters:
    `v` - a vector with cardinality equal to getNumCols() of the recipient
  Returns:
    a new vector (typically a DenseVector)
  Throws:
    `CardinalityException` - if this.getNumRows() != v.size()

### timesSquared

    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)

  Parameters:
    `v` - a vector with cardinality equal to getNumCols() of the recipient
  Returns:
    a new vector (typically a DenseVector) with cardinality equal to that of the argument.
  Throws:
    `CardinalityException` - if this.getNumCols() != v.size()

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.