org.apache.mahout.cf.taste.hadoop.cooccurence
Class Bigram.FirstGroupingComparator
java.lang.Object
org.apache.hadoop.io.WritableComparator
org.apache.mahout.cf.taste.hadoop.cooccurence.Bigram.FirstGroupingComparator
- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator, org.apache.hadoop.io.RawComparator
- Enclosing class:
- Bigram
public static class Bigram.FirstGroupingComparator
- extends org.apache.hadoop.io.WritableComparator
- implements java.io.Serializable
Compare only the first part of the bigram, so that reduce is called once for each value of the first
part.
- See Also:
- Serialized Form
Method Summary |
int |
compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
Methods inherited from class org.apache.hadoop.io.WritableComparator |
compare, compareBytes, define, get, getKeyClass, hashBytes, newKey, readDouble, readFloat, readInt, readLong, readUnsignedShort, readVInt, readVLong |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
Bigram.FirstGroupingComparator
public Bigram.FirstGroupingComparator()
compare
public int compare(byte[] b1,
int s1,
int l1,
byte[] b2,
int s2,
int l2)
- Specified by:
compare
in interface org.apache.hadoop.io.RawComparator
- Overrides:
compare
in class org.apache.hadoop.io.WritableComparator
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Specified by:
compare
in interface java.util.Comparator
- Overrides:
compare
in class org.apache.hadoop.io.WritableComparator
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.