org.apache.mahout.math
Class MatrixWritable

java.lang.Object
  extended by org.apache.mahout.math.MatrixWritable
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class MatrixWritable
extends Object
implements org.apache.hadoop.io.Writable


Constructor Summary
MatrixWritable()
           
MatrixWritable(Matrix m)
           
 
Method Summary
 Matrix get()
           
 void readFields(DataInput in)
           
static void readLabels(DataInput in, Map<String,Integer> columnLabelBindings, Map<String,Integer> rowLabelBindings)
           
static Matrix readMatrix(DataInput in)
          Reads a typed Matrix instance from the input stream
 void set(Matrix matrix)
           
 void write(DataOutput out)
           
static void writeLabelBindings(DataOutput out, Map<String,Integer> columnLabelBindings, Map<String,Integer> rowLabelBindings)
           
static void writeMatrix(DataOutput out, Matrix matrix)
          Writes a typed Matrix instance to the output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixWritable

public MatrixWritable()

MatrixWritable

public MatrixWritable(Matrix m)
Method Detail

get

public Matrix get()

set

public void set(Matrix matrix)

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

readLabels

public static void readLabels(DataInput in,
                              Map<String,Integer> columnLabelBindings,
                              Map<String,Integer> rowLabelBindings)
                       throws IOException
Throws:
IOException

writeLabelBindings

public static void writeLabelBindings(DataOutput out,
                                      Map<String,Integer> columnLabelBindings,
                                      Map<String,Integer> rowLabelBindings)
                               throws IOException
Throws:
IOException

readMatrix

public static Matrix readMatrix(DataInput in)
                         throws IOException
Reads a typed Matrix instance from the input stream

Throws:
IOException

writeMatrix

public static void writeMatrix(DataOutput out,
                               Matrix matrix)
                        throws IOException
Writes a typed Matrix instance to the output stream

Throws:
IOException


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