org.apache.mahout.clustering.spectral
Class IntDoublePairWritable
java.lang.Object
org.apache.mahout.clustering.spectral.IntDoublePairWritable
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class IntDoublePairWritable
- extends 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(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
getKey
public int getKey()
getValue
public double getValue()
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.