Package dovetaildb.bagindex.PrefixCompressedBagIndex

Examples of dovetaildb.bagindex.PrefixCompressedBagIndex.SlotBuffer


    };
    return new PrefixCompressedBagIndex(new TrivialBagIndex(), mapping);
  }
  public void testSlotBuffer() {
    SlotBuffer buf = new SlotBuffer();
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString(""),    20));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString("abc"), 12));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString("abcx"), 2));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString("abcy"), 5));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString("a"),    0));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString("b"),    1));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString(""),     2));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString("f"),    8));
    buf.slots.add(new SlotBufferItem(ArrayBytes.fromString(""),     4));
    buf.collapse(4, 35);
    //System.out.println(buf.slots);
    List<SlotBufferItem> items = buf.slots;
    assertEquals(4, items.size());
    assertEquals(ArrayBytes.fromString(""), items.get(0).bytes);
    assertEquals(20, items.get(0).hits);
View Full Code Here

TOP

Related Classes of dovetaildb.bagindex.PrefixCompressedBagIndex.SlotBuffer

Copyright © 2018 www.massapicom. 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.