Examples of ImmutableRoaringBitmap


Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

   */
  private final ImmutableRoaringBitmap invertedIndex;

  protected WrappedImmutableRoaringBitmap(ByteBuffer byteBuffer)
  {
    this.invertedIndex = new ImmutableRoaringBitmap(byteBuffer.asReadOnlyBuffer());
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

  @Override
  public ImmutableGenericBitmap union(ImmutableGenericBitmap bitmap)
  {
    WrappedImmutableRoaringBitmap other = (WrappedImmutableRoaringBitmap) bitmap;
    ImmutableRoaringBitmap otherIndex = other.invertedIndex;
    return new WrappedImmutableRoaringBitmap(ImmutableRoaringBitmap.or(invertedIndex, otherIndex));
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

  @Override
  public ImmutableGenericBitmap intersection(ImmutableGenericBitmap bitmap)
  {
    WrappedImmutableRoaringBitmap other = (WrappedImmutableRoaringBitmap) bitmap;
    ImmutableRoaringBitmap otherIndex = other.invertedIndex;
    return new WrappedImmutableRoaringBitmap(ImmutableRoaringBitmap.and(invertedIndex, otherIndex));
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

  @Override
  public ImmutableGenericBitmap difference(ImmutableGenericBitmap bitmap)
  {
    WrappedImmutableRoaringBitmap other = (WrappedImmutableRoaringBitmap) bitmap;
    ImmutableRoaringBitmap otherIndex = other.invertedIndex;
    return new WrappedImmutableRoaringBitmap(ImmutableRoaringBitmap.andNot(invertedIndex, otherIndex));
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

    r.serialize(new DataOutputStream(out));
    final byte[] bytes = out.toByteArray();
    Assert.assertEquals(buf.remaining(), bytes.length);
    buf.put(bytes);
    buf.rewind();
    return new ImmutableRoaringBitmap(buf.asReadOnlyBuffer());
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

  }

  @Test
  public void timeRoaringUnion() throws Exception
  {
    ImmutableRoaringBitmap union = BufferFastAggregation.horizontal_or(Lists.newArrayList(roaring).iterator());
    Assert.assertEquals(unionCount, union.getCardinality());
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

  }

  @Test
  public void timeImmutableRoaringUnion() throws Exception
  {
    ImmutableRoaringBitmap union = BufferFastAggregation.horizontal_or(Lists.newArrayList(immutableRoaring).iterator());
    Assert.assertEquals(unionCount, union.getCardinality());
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

  }

  @Test
  public void timeOffheapRoaringUnion() throws Exception
  {
    ImmutableRoaringBitmap union = BufferFastAggregation.horizontal_or(Lists.newArrayList(offheapRoaring).iterator());
    Assert.assertEquals(unionCount, union.getCardinality());
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.ImmutableRoaringBitmap

    @Override
    public ImmutableBitmap fromByteBuffer(ByteBuffer buffer, int numBytes)
    {
      final ByteBuffer readOnlyBuffer = buffer.asReadOnlyBuffer();
      readOnlyBuffer.limit(readOnlyBuffer.position() + numBytes);
      return new WrappedImmutableRoaringBitmap(new ImmutableRoaringBitmap(readOnlyBuffer));
    }
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.