## org.apache.mahout.math.hadoop.stochasticsvd
Class SparseRowBlockWritable

    java.lang.Object
      org.apache.mahout.math.hadoop.stochasticsvd.SparseRowBlockWritable

All Implemented Interfaces:
  org.apache.hadoop.io.Writable

    public class SparseRowBlockWritable

extends Object
implements org.apache.hadoop.io.Writable

block that supports accumulating rows and their sums , suitable for combiner and reducers of multiplication jobs.

Constructor Summary
`SparseRowBlockWritable()`
`SparseRowBlockWritable(int initialCapacity)`

Method Summary
`void` `clear()`
`int` `getNumRows()`
`int[]` `getRowIndices()`
`Vector[]` `getRows()`
`void` `plusBlock(SparseRowBlockWritable bOther)` pluses one block into another.
`void` `plusRow(int index, Vector row)`
`void` `readFields(DataInput in)`
`void` `write(DataOutput out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SparseRowBlockWritable

    public SparseRowBlockWritable()

### SparseRowBlockWritable

    public SparseRowBlockWritable(int initialCapacity)

Method Detail

### getRowIndices

    public int[] getRowIndices()

### getRows

    public Vector[] getRows()

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Specified by:
    `readFields` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

### write

    public void write(DataOutput out)
               throws IOException

  Specified by:
    `write` in interface `org.apache.hadoop.io.Writable`
  Throws:
    `IOException`

### plusRow

    public void plusRow(int index,
                        Vector row)

### plusBlock

    public void plusBlock(SparseRowBlockWritable bOther)

  pluses one block into another. Use it for accumulation of partial products in combiners and reducers.

  Parameters:
    `bOther` - block to add

### getNumRows

    public int getNumRows()

### clear

    public void clear()

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