## org.apache.mahout.math.hadoop.similarity
Class SimilarityMatrixEntryKey

    java.lang.Object
      org.apache.mahout.math.hadoop.similarity.SimilarityMatrixEntryKey

All Implemented Interfaces:
  java.lang.Comparable<SimilarityMatrixEntryKey>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<SimilarityMatrixEntryKey>

    public class SimilarityMatrixEntryKey

extends java.lang.Object
implements org.apache.hadoop.io.WritableComparable<SimilarityMatrixEntryKey>

used as key for the `RowSimilarityJob.EntriesToVectorsReducer` to collect all rows similar to the specified row ensures that the similarity matrix entries for a row are seen in descending order by their similarity value via secondary sort

Nested Class Summary
`static class` `SimilarityMatrixEntryKey.SimilarityMatrixEntryKeyComparator`
`static class` `SimilarityMatrixEntryKey.SimilarityMatrixEntryKeyGroupingComparator`

Constructor Summary
`SimilarityMatrixEntryKey()`
`SimilarityMatrixEntryKey(int row, double value)`

Method Summary
`int` `compareTo(SimilarityMatrixEntryKey other)`
`boolean` `equals(java.lang.Object other)`
`int` `getRow()`
`int` `hashCode()`
`void` `readFields(java.io.DataInput in)`
`void` `set(int row, double value)`
`void` `write(java.io.DataOutput out)`

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

Constructor Detail

### SimilarityMatrixEntryKey

    public SimilarityMatrixEntryKey()

### SimilarityMatrixEntryKey

    public SimilarityMatrixEntryKey(int row,
                                    double value)

Method Detail

### set

    public void set(int row,
                    double value)

### getRow

    public int getRow()

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

### compareTo

    public int compareTo(SimilarityMatrixEntryKey other)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<SimilarityMatrixEntryKey>`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object other)

  Overrides:
    `equals` in class `java.lang.Object`

Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.