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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
SimilarityMatrixEntryKey
public SimilarityMatrixEntryKey()
SimilarityMatrixEntryKey
public SimilarityMatrixEntryKey(int row,
double value)
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.