org.apache.mahout.math
Class MatrixWritable
java.lang.Object
org.apache.mahout.math.MatrixWritable
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class MatrixWritable
- extends java.lang.Object
- implements org.apache.hadoop.io.Writable
Method Summary |
Matrix |
get()
|
void |
readFields(java.io.DataInput in)
|
static void |
readLabels(java.io.DataInput in,
java.util.Map<java.lang.String,java.lang.Integer> columnLabelBindings,
java.util.Map<java.lang.String,java.lang.Integer> rowLabelBindings)
|
static Matrix |
readMatrix(java.io.DataInput in)
Reads a typed Matrix instance from the input stream |
void |
set(Matrix matrix)
|
void |
write(java.io.DataOutput out)
|
static void |
writeLabelBindings(java.io.DataOutput out,
java.util.Map<java.lang.String,java.lang.Integer> columnLabelBindings,
java.util.Map<java.lang.String,java.lang.Integer> rowLabelBindings)
|
static void |
writeMatrix(java.io.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 |
MatrixWritable
public MatrixWritable()
MatrixWritable
public MatrixWritable(Matrix m)
get
public Matrix get()
set
public void set(Matrix matrix)
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
readFields
public void readFields(java.io.DataInput in)
throws java.io.IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
java.io.IOException
readLabels
public static void readLabels(java.io.DataInput in,
java.util.Map<java.lang.String,java.lang.Integer> columnLabelBindings,
java.util.Map<java.lang.String,java.lang.Integer> rowLabelBindings)
throws java.io.IOException
- Throws:
java.io.IOException
writeLabelBindings
public static void writeLabelBindings(java.io.DataOutput out,
java.util.Map<java.lang.String,java.lang.Integer> columnLabelBindings,
java.util.Map<java.lang.String,java.lang.Integer> rowLabelBindings)
throws java.io.IOException
- Throws:
java.io.IOException
readMatrix
public static Matrix readMatrix(java.io.DataInput in)
throws java.io.IOException
- Reads a typed Matrix instance from the input stream
- Throws:
java.io.IOException
writeMatrix
public static void writeMatrix(java.io.DataOutput out,
Matrix matrix)
throws java.io.IOException
- Writes a typed Matrix instance to the output stream
- Throws:
java.io.IOException
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.