Example usage for org.apache.mahout.vectorizer.collocations.llr GramKey getBytes

List of usage examples for org.apache.mahout.vectorizer.collocations.llr GramKey getBytes

Introduction

In this page you can find the example usage for org.apache.mahout.vectorizer.collocations.llr GramKey getBytes.

Prototype

@Override
    public byte[] getBytes() 

Source Link

Usage

From source file:edu.rosehulman.GramKeyGroupComparator.java

License:Apache License

@Override
public int compare(WritableComparable a, WritableComparable b) {
    GramKey gka = (GramKey) a;
    GramKey gkb = (GramKey) b;/*  ww w.ja  v a2  s .co  m*/

    return WritableComparator.compareBytes(gka.getBytes(), 0, gka.getPrimaryLength(), gkb.getBytes(), 0,
            gkb.getPrimaryLength());
}