This commit is contained in:
callison-burch 2008-05-16 20:16:50 +00:00
parent 1f1f3449ac
commit 06a9cad575

View File

@ -2,11 +2,10 @@ package org.statmt.hg4;
import java.util.BitSet;
public class Coverage {
public class Coverage implements Comparable {
BitSet coverage;
/**
*
* @param phraseSize
* @param coverageStart
* @param coverageEnd (exclusive)
@ -48,4 +47,9 @@ public class Coverage {
assert(this.coverage.size() == other.coverage.size());
return !this.coverage.intersects(other.coverage);
}
public int compareTo(Object o) {
Coverage other = (Coverage) o;
return this.coverage.cardinality() - other.coverage.cardinality();
}
}