org.apache.mahout.math.hadoop.similarity
Class WeightedRowPair
java.lang.Object
org.apache.mahout.math.hadoop.similarity.WeightedRowPair
- All Implemented Interfaces:
- java.lang.Comparable<WeightedRowPair>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<WeightedRowPair>
public class WeightedRowPair
- extends java.lang.Object
- implements org.apache.hadoop.io.WritableComparable<WeightedRowPair>
a pair of row vectors that has at least one entry != NaN in the same column together with the precomputed weights of
the row vectors
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
WeightedRowPair
public WeightedRowPair()
WeightedRowPair
public WeightedRowPair(int rowA,
int rowB,
double weightA,
double weightB)
set
public void set(int rowA,
int rowB,
double weightA,
double weightB)
getRowA
public int getRowA()
getRowB
public int getRowB()
getWeightA
public double getWeightA()
getWeightB
public double getWeightB()
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(WeightedRowPair other)
- Specified by:
compareTo
in interface java.lang.Comparable<WeightedRowPair>
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
compare
protected static int compare(int a,
int b)
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.