Package org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm

Examples of org.terrier.structures.indexing.singlepass.hadoop.SplitEmittedTerm.SETRawComparatorTermSplitFlush.compare()


    assertEquals(0, compare.compare(t1, t2));
    assertEquals(0, compare.compare(t2, t1));
   
    SETRawComparatorTermSplitFlush compare2 = new SETRawComparatorTermSplitFlush();
    assertTrue(compare2.compare(t1, t2) < 0);
    assertTrue(compare2.compare(t2, t1) > 0);
    byte[] t1w = toBytes(t1);
    byte[] t2w = toBytes(t2);
    assertEquals(0, compare.compare(t1w, 0, t1w.length, t2w, 0, t2w.length));
    assertEquals(0, compare.compare(t2w, 0, t2w.length, t1w, 0, t1w.length));
    assertTrue(compare2.compare(t1w, 0, t1w.length, t2w, 0, t2w.length) < 0);
View Full Code Here


    assertTrue(compare2.compare(t2, t1) > 0);
    byte[] t1w = toBytes(t1);
    byte[] t2w = toBytes(t2);
    assertEquals(0, compare.compare(t1w, 0, t1w.length, t2w, 0, t2w.length));
    assertEquals(0, compare.compare(t2w, 0, t2w.length, t1w, 0, t1w.length));
    assertTrue(compare2.compare(t1w, 0, t1w.length, t2w, 0, t2w.length) < 0);
    assertTrue(compare2.compare(t2w, 0, t2w.length, t1w, 0, t1w.length) > 0);
  }
 
  public void testCompareTermSplit() throws Exception
  {
View Full Code Here

    byte[] t1w = toBytes(t1);
    byte[] t2w = toBytes(t2);
    assertEquals(0, compare.compare(t1w, 0, t1w.length, t2w, 0, t2w.length));
    assertEquals(0, compare.compare(t2w, 0, t2w.length, t1w, 0, t1w.length));
    assertTrue(compare2.compare(t1w, 0, t1w.length, t2w, 0, t2w.length) < 0);
    assertTrue(compare2.compare(t2w, 0, t2w.length, t1w, 0, t1w.length) > 0);
  }
 
  public void testCompareTermSplit() throws Exception
  {
   
View Full Code Here

    assertTrue(t2.compareTo(t1) > 0);
    assertEquals(sign(t1.getTerm().compareTo(t2.getTerm())), sign(compare.compare(t1, t2)));
    assertEquals(sign(t2.getTerm().compareTo(t1.getTerm())), sign(compare.compare(t2, t1)));
   
    SETRawComparatorTermSplitFlush compare2 = new SETRawComparatorTermSplitFlush();
    assertTrue(compare2.compare(t1, t2) < 0);
    assertTrue(compare2.compare(t2, t1) > 0);
    byte[] t1w = toBytes(t1);
    byte[] t2w = toBytes(t2);
    assertEquals(sign(t1.getTerm().compareTo(t2.getTerm())), sign(compare.compare(t1w, 0, t1w.length, t2w, 0, t2w.length)));
    assertEquals(sign(t2.getTerm().compareTo(t1.getTerm())), sign(compare.compare(t2w, 0, t2w.length, t1w, 0, t1w.length)));
View Full Code Here

    assertEquals(sign(t1.getTerm().compareTo(t2.getTerm())), sign(compare.compare(t1, t2)));
    assertEquals(sign(t2.getTerm().compareTo(t1.getTerm())), sign(compare.compare(t2, t1)));
   
    SETRawComparatorTermSplitFlush compare2 = new SETRawComparatorTermSplitFlush();
    assertTrue(compare2.compare(t1, t2) < 0);
    assertTrue(compare2.compare(t2, t1) > 0);
    byte[] t1w = toBytes(t1);
    byte[] t2w = toBytes(t2);
    assertEquals(sign(t1.getTerm().compareTo(t2.getTerm())), sign(compare.compare(t1w, 0, t1w.length, t2w, 0, t2w.length)));
    assertEquals(sign(t2.getTerm().compareTo(t1.getTerm())), sign(compare.compare(t2w, 0, t2w.length, t1w, 0, t1w.length)));
    assertTrue(compare2.compare(t1w, 0, t1w.length, t2w, 0, t2w.length) < 0);
View Full Code Here

    assertTrue(compare2.compare(t2, t1) > 0);
    byte[] t1w = toBytes(t1);
    byte[] t2w = toBytes(t2);
    assertEquals(sign(t1.getTerm().compareTo(t2.getTerm())), sign(compare.compare(t1w, 0, t1w.length, t2w, 0, t2w.length)));
    assertEquals(sign(t2.getTerm().compareTo(t1.getTerm())), sign(compare.compare(t2w, 0, t2w.length, t1w, 0, t1w.length)));
    assertTrue(compare2.compare(t1w, 0, t1w.length, t2w, 0, t2w.length) < 0);
    assertTrue(compare2.compare(t2w, 0, t2w.length, t1w, 0, t1w.length) > 0);
  }
 
  public void testCompareTermFlush() throws Exception
  {   
View Full Code Here

    byte[] t1w = toBytes(t1);
    byte[] t2w = toBytes(t2);
    assertEquals(sign(t1.getTerm().compareTo(t2.getTerm())), sign(compare.compare(t1w, 0, t1w.length, t2w, 0, t2w.length)));
    assertEquals(sign(t2.getTerm().compareTo(t1.getTerm())), sign(compare.compare(t2w, 0, t2w.length, t1w, 0, t1w.length)));
    assertTrue(compare2.compare(t1w, 0, t1w.length, t2w, 0, t2w.length) < 0);
    assertTrue(compare2.compare(t2w, 0, t2w.length, t1w, 0, t1w.length) > 0);
  }
 
  public void testCompareTermFlush() throws Exception
  {   
    SplitEmittedTerm t1,t2;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.