## 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.

Constructor Summary
`IntDoublePairWritable()`
`IntDoublePairWritable(int k, double v)`

Method Summary
`int` `getKey()`
`double` `getValue()`
`void` `readFields(DataInput in)`
`void` `setKey(int k)`
`void` `setValue(double v)`
`void` `write(DataOutput out)`

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

Constructor Detail

### IntDoublePairWritable

    public IntDoublePairWritable()

### IntDoublePairWritable

    public IntDoublePairWritable(int k,
                                 double v)

Method Detail

### 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.