Examples of LongSet


Examples of com.gs.collections.api.set.primitive.LongSet

        }

        public boolean retainAll(LongIterable source)
        {
            int oldSize = this.size();
            final LongSet sourceSet = source instanceof LongSet ? (LongSet) source : source.toSet();
            LongDoubleHashMap retained = LongDoubleHashMap.this.select(new LongDoublePredicate()
            {
                public boolean accept(long key, double value)
                {
                    return sourceSet.contains(key);
                }
            });
            if (retained.size() != oldSize)
            {
                LongDoubleHashMap.this.keys = retained.keys;
View Full Code Here

Examples of com.gs.collections.api.set.primitive.LongSet

            if (!(obj instanceof LongSet))
            {
                return false;
            }

            LongSet other = (LongSet) obj;
            return this.size() == other.size() && this.containsAll(other.toArray());
        }
View Full Code Here

Examples of com.gs.collections.api.set.primitive.LongSet

        }

        public boolean retainAll(LongIterable source)
        {
            int oldSize = LongBooleanHashMap.this.size();
            final LongSet sourceSet = source instanceof LongSet ? (LongSet) source : source.toSet();
            LongBooleanHashMap retained = LongBooleanHashMap.this.select(new LongBooleanPredicate()
            {
                public boolean accept(long key, boolean value)
                {
                    return sourceSet.contains(key);
                }
            });
            if (retained.size() != oldSize)
            {
                LongBooleanHashMap.this.keys = retained.keys;
View Full Code Here

Examples of com.gs.collections.api.set.primitive.LongSet

            if (!(obj instanceof LongSet))
            {
                return false;
            }

            LongSet other = (LongSet) obj;
            return this.size() == other.size() && this.containsAll(other.toArray());
        }
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongSet

  }

  @Override
  public RandomAccessFilter buildRandomAccessAndFilter(String[] vals,
      Properties prop) throws IOException {
    LongSet longSet = new LongOpenHashSet();
    for (String val : vals){
      try{
        longSet.add(Long.parseLong(val));
      }
      catch(Exception e){
        throw new IOException(e.getMessage());
      }
    }
    if (longSet.size()!=1){
      return EmptyFilter.getInstance();
    }
    else{
      return buildRandomAccessFilter(longSet.iterator().nextLong());
    }
  }
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongSet

  }

  @Override
  public RandomAccessFilter buildRandomAccessOrFilter(String[] vals,
      Properties prop, boolean isNot) throws IOException {
    LongSet longSet = new LongOpenHashSet();
    for (String val : vals){
      try{
        longSet.add(Long.parseLong(val));
      }
      catch(Exception e){
        throw new IOException(e.getMessage());
      }
    }
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongSet

    BaseSearchIndex<R,V> idx = getSearchIndex();

    Long2ObjectMap<List<IndexingReq>> addList = new Long2ObjectOpenHashMap<List<IndexingReq>>();
    V version = idx.getVersion();    // current version

    LongSet delSet =new LongOpenHashSet();
   
    try {
      for(DataEvent<ZoieIndexable,V> evt : events)
      {
        if (evt == null) continue;
            //version = Math.max(version, evt.getVersion());
            version = version == null ? evt.getVersion() : (version.compareTo(evt.getVersion()) < 0 ? evt.getVersion() : version);
            // interpret and get get the indexable instance
            ZoieIndexable indexable = evt.getData();
            if (indexable == null || indexable.isSkip())
              continue;
   
            long uid = indexable.getUID();
            delSet.add(uid);
            addList.remove(uid);
        if (!indexable.isDeleted()) // update event
        {
          IndexingReq[] reqs = indexable.buildIndexingReqs();
          for (IndexingReq req : reqs) {
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongSet

        ZoieIndexReader<R> oldReader = _currentReader;
        _currentReader = reader;
        if (oldReader != null)
          ((ZoieIndexReader) oldReader).decZoieRef();// .decRef();
      }
      LongSet delDocs = _delDocs;
      clearDeletes();
      markDeletes(delDocs); // re-mark deletes
      commitDeletes();
    }
  }
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongSet

  public void refresh()
  {
    synchronized(this)
    {
      try {
        LongSet delDocs = _delDocs;
        clearDeletes();
        _dispenser.getNewReader();
        markDeletes(delDocs); // re-mark deletes
        commitDeletes();
      } catch (IOException e) {
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.LongSet

      if(reader == null) return;
     
      Directory dir = reader.directory();
     
      // hao: delete docs in disk index
      LongSet delDocs = _delDocs;
      clearDeletes();
      deleteDocs(delDocs);
     
      // hao: merge the readOnly ram index with the disk index
      IndexWriter writer = null;
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.