Package it.uniroma3.mat.extendedset.intset

Examples of it.uniroma3.mat.extendedset.intset.ImmutableConciseSet


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


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

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

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

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

  @Override
  public ImmutableGenericBitmap union(ImmutableGenericBitmap bitmap)
  {
    WrappedConciseBitmap other = (WrappedConciseBitmap) bitmap;
    ConciseSet otherIndex = other.invertedIndex;
    return new WrappedConciseBitmap(invertedIndex.clone().union(otherIndex));
  }
View Full Code Here

  @Override
  public ImmutableGenericBitmap intersection(ImmutableGenericBitmap bitmap)
  {
    WrappedConciseBitmap other = (WrappedConciseBitmap) bitmap;
    ConciseSet otherIndex = other.invertedIndex;
    return new WrappedConciseBitmap(invertedIndex.clone().intersection(otherIndex));
  }
View Full Code Here

  @Override
  public ImmutableGenericBitmap difference(ImmutableGenericBitmap bitmap)
  {
    WrappedConciseBitmap other = (WrappedConciseBitmap) bitmap;
    ConciseSet otherIndex = other.invertedIndex;
    return new WrappedConciseBitmap(invertedIndex.clone().difference(otherIndex));
  }
View Full Code Here

    final int[] knownTrue = new int[MIN_INTERSECT];
    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]);
View Full Code Here

    System.setProperty("jub.customkey", String.format("%06.5f", DENSITY));
    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]);
View Full Code Here

TOP

Related Classes of it.uniroma3.mat.extendedset.intset.ImmutableConciseSet

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.