org.apache.mahout.clustering.spectral.common
Class IntDoublePairWritable
java.lang.Object
org.apache.mahout.clustering.spectral.common.IntDoublePairWritable
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class IntDoublePairWritable
- extends java.lang.Object
- implements org.apache.hadoop.io.Writable
This class is a Writable implementation of the mahout.common.Pair
generic class. Since the generic types would also themselves have to
implement Writable, it made more sense to create a more specialized
version of the class altogether.
In essence, this can be treated as a single Vector Element.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntDoublePairWritable
public IntDoublePairWritable()
IntDoublePairWritable
public IntDoublePairWritable(int k,
double v)
setKey
public void setKey(int k)
setValue
public void setValue(double v)
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
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
getKey
public int getKey()
getValue
public double getValue()
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.