Examples of MutableRoaringBitmap


Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

  /**
   * Create a new WrappedRoaringBitmap wrapping an empty MutableRoaringBitmap
   */
  public WrappedRoaringBitmap()
  {
    this.invertedIndex = new MutableRoaringBitmap();
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

  @Override
  public void or(GenericBitmap bitmap)
  {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) bitmap;
    MutableRoaringBitmap otherIndex = other.invertedIndex;
    invertedIndex.or(otherIndex);
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

  @Override
  public void and(GenericBitmap bitmap)
  {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) bitmap;
    MutableRoaringBitmap otherIndex = other.invertedIndex;
    invertedIndex.and(otherIndex);
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

  @Override
  public void andNot(GenericBitmap bitmap)
  {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) bitmap;
    MutableRoaringBitmap otherIndex = other.invertedIndex;
    invertedIndex.andNot(otherIndex);
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

  @Override
  public void xor(GenericBitmap bitmap)
  {
    WrappedRoaringBitmap other = (WrappedRoaringBitmap) bitmap;
    MutableRoaringBitmap otherIndex = other.invertedIndex;
    invertedIndex.xor(otherIndex);
  }
View Full Code Here

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

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

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

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

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

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

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

    for (int i = 0; i < knownTrue.length; ++i) {
      knownTrue[i] = rand.nextInt(LENGTH);
    }
    for (int i = 0; i < SIZE; ++i) {
      ConciseSet c = new ConciseSet();
      MutableRoaringBitmap r = new MutableRoaringBitmap();
      for (int k = 0; k < LENGTH; ++k) {
        if (rand.nextDouble() < DENSITY) {
          c.add(k);
          r.add(k);
          expectedUnion.set(k);
        }
      }
      for (int k : knownTrue) {
        c.add(k);
        r.add(k);
        expectedUnion.set(k);
      }
      concise[i] = ImmutableConciseSet.newImmutableFromMutable(c);
      offheapConcise[i] = makeOffheapConcise(concise[i]);
      roaring[i] = r;
View Full Code Here

Examples of org.roaringbitmap.buffer.MutableRoaringBitmap

    reset();

    final BitSet expectedUnion = new BitSet();
    for (int i = 0; i < SIZE; ++i) {
      ConciseSet c = new ConciseSet();
      MutableRoaringBitmap r = new MutableRoaringBitmap();
      {
        int k = 0;
        boolean fill = true;
        while (k < LENGTH) {
          int runLength = (int) (LENGTH * DENSITY) + rand.nextInt((int) (LENGTH * DENSITY));
          for (int j = k; fill && j < LENGTH && j < k + runLength; ++j) {
            c.add(j);
            r.add(j);
            expectedUnion.set(j);
          }
          k += runLength;
          fill = !fill;
        }
      }
      minIntersection = MIN_INTERSECT;
      for (int k = LENGTH / 2; k < LENGTH / 2 + minIntersection; ++k) {
        c.add(k);
        r.add(k);
        expectedUnion.set(k);
      }
      concise[i] = ImmutableConciseSet.newImmutableFromMutable(c);
      offheapConcise[i] = makeOffheapConcise(concise[i]);
      roaring[i] = r;
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.