Examples of LongArrayList


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

    }

    public void testEmptySemiExternalOffsetListGammaCoding() throws IOException {

    long[] offsets = {  };
    LongList listOffsets = new LongArrayList( offsets );

    new SemiExternalOffsetList( buildInputStream( listOffsets ), 1, listOffsets.size() );
    assertTrue( true );
    }
View Full Code Here

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

    ZoieSystem<IndexReader,DocumentWithID> zoie = zoieHome.getZoieSystem();
    if (zoie==null){
      throw new IOException("zoie is not setup");
    }

    final LongList delList = new LongArrayList();
   
    List<ZoieIndexReader<IndexReader>> readerList = null;
    IndexSearcher searcher = null;
    try{
      readerList = zoie.getIndexReaders();
      MultiReader reader = new MultiReader(readerList.toArray(new IndexReader[readerList.size()]), false);
      searcher = new IndexSearcher(reader);
      searcher.search(q, new Collector(){
        ZoieIndexReader<IndexReader> zoieReader = null;
        int base = 0;
        @Override
        public boolean acceptsDocsOutOfOrder() {
          return true;
        }

        @Override
        public void collect(int doc) throws IOException {
          long uid = zoieReader.getUID(doc+base);
          if (uid!=DocIDMapper.NOT_FOUND){
            delList.add(uid);
          }
        }

        @Override
        public void setNextReader(IndexReader reader, int base)
            throws IOException {
          zoieReader = (ZoieIndexReader<IndexReader>)reader;
          this.base = base;
        }

        @Override
        public void setScorer(Scorer scorer) throws IOException {
         
        }
       
      });
     
     
     
    }
    finally{
      try{
        if (searcher!=null){
        searcher.close();
        }
      }
      finally{
           if (readerList!=null){
        zoie.returnIndexReaders(readerList);
        }
      }
    }
   
    if (delList.size()>0){
      long version = zoie.getCurrentVersion();
      ArrayList<DataEvent<DocumentWithID>> eventList = new ArrayList<DataEvent<DocumentWithID>>(delList.size());
      for (long val : delList){
        eventList.add(new DataEvent<DocumentWithID>(version,new DocumentWithID(val,true)));
      }
      try {
        zoie.consume(eventList);
View Full Code Here

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

    }
  }

  @Override
  public void initialize(int capacity) {
    neighbors = new LongArrayList(capacity);
    edgeValues = new DoubleArrayList(capacity);
  }
View Full Code Here

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

    edgeValues = new DoubleArrayList(capacity);
  }

  @Override
  public void initialize() {
    neighbors = new LongArrayList();
    edgeValues = new DoubleArrayList();
  }
View Full Code Here

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

    }
  }

  @Override
  public void initialize(int capacity) {
    neighbors = new LongArrayList(capacity);
  }
View Full Code Here

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

    neighbors = new LongArrayList(capacity);
  }

  @Override
  public void initialize() {
    neighbors = new LongArrayList();
  }
View Full Code Here

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

        // crate hash strategy with a single channel blocks -- make sure there is some overlap in values
        List<Block> channel = ImmutableList.of(
                BlockAssertions.createStringSequenceBlock(10, 20),
                BlockAssertions.createStringSequenceBlock(20, 30),
                BlockAssertions.createStringSequenceBlock(15, 25));
        LongArrayList addresses = new LongArrayList();
        for (int blockIndex = 0; blockIndex < channel.size(); blockIndex++) {
            Block block = channel.get(blockIndex);
            for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) {
                addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));
            }
        }
        LookupSource lookupSource = lookupSourceFactoryFactory.createLookupSource(addresses, types, ImmutableList.of(channel), operatorContext);

        JoinProbeCompiler joinProbeCompiler = new JoinProbeCompiler();
View Full Code Here

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

  @Override
  protected List<?> buildPrimitiveList(int capacity)
  {
    _type = Long.class;
    return capacity > 0 ? new LongArrayList(capacity) : new LongArrayList();
  }
View Full Code Here

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

  @Override
  protected List<?> buildPrimitiveList(int capacity)
  {
    _type = long[].class;
    return capacity > 0 ? new LongArrayList(capacity) : new LongArrayList();
  }
View Full Code Here

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

  @Override
  protected List<?> buildPrimitiveList(int capacity)
  {
    _type = long[].class;
    return capacity > 0 ? new LongArrayList(capacity) : new LongArrayList();
  }
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.