org.apache.mahout.math.hadoop.similarity
Class WeightedRowPair
java.lang.Object
org.apache.mahout.math.hadoop.similarity.WeightedRowPair
- All Implemented Interfaces:
- Comparable<WeightedRowPair>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<WeightedRowPair>
public class WeightedRowPair
- extends 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
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(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
compareTo
public int compareTo(WeightedRowPair other)
- Specified by:
compareTo
in interface Comparable<WeightedRowPair>
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object
compare
protected static int compare(int a,
int b)
Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.