org.apache.mahout.cf.taste.hadoop.cooccurence
Class Bigram.Comparator

java.lang.Object
  extended by org.apache.hadoop.io.WritableComparator
      extended by org.apache.mahout.cf.taste.hadoop.cooccurence.Bigram.Comparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator, org.apache.hadoop.io.RawComparator
Enclosing class:
Bigram

public static class Bigram.Comparator
extends org.apache.hadoop.io.WritableComparator
implements java.io.Serializable

A Comparator that compares serialized Bigrams.

See Also:
Serialized Form

Constructor Summary
Bigram.Comparator()
           
 
Method Summary
 int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2)
          Compare varibale length encoded numbers *
 
Methods inherited from class org.apache.hadoop.io.WritableComparator
compare, 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
 

Constructor Detail

Bigram.Comparator

public Bigram.Comparator()
Method Detail

compare

public int compare(byte[] b1,
                   int s1,
                   int l1,
                   byte[] b2,
                   int s2,
                   int l2)
Compare varibale length encoded numbers *

Specified by:
compare in interface org.apache.hadoop.io.RawComparator
Overrides:
compare in class org.apache.hadoop.io.WritableComparator


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