Package it.unimi.dsi.fastutil.longs

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


  @Override
  public void markDeletes(LongSet delDocs, LongSet deletedUIDs)
  {
      DocIDMapper idMapper = getDocIDMaper();
      LongIterator iter = delDocs.iterator();
      IntRBTreeSet delDocIdSet = _delDocIdSet;

      while(iter.hasNext())
      {
        long uid = iter.nextLong();
        if (ZoieIndexReader.DELETED_UID != uid)
        {
          int docid = idMapper.getDocID(uid);
          if(docid != DocIDMapper.NOT_FOUND)
          {
View Full Code Here


        ZoieIndexReader<R> reader= openIndexReader();
        if (reader!=null)
        {
        IntList delList = new IntArrayList(delDocs.size());
        DocIDMapper idMapper = reader.getDocIDMaper();
        LongIterator iter = delDocs.iterator();
         
        while(iter.hasNext()){
          long uid = iter.nextLong();
          if (ZoieIndexReader.DELETED_UID!=uid){
            int docid = idMapper.getDocID(uid);
            if (docid!=DocIDMapper.NOT_FOUND){
              delList.add(docid);
            }
View Full Code Here

    mask |= (mask >> 4);
    mask |= (mask >> 8);
    mask |= (mask >> 16);
    _mask = mask;
    _filter = new long[mask + 1];
    LongIterator iter = set.iterator();
    while (iter.hasNext()) {
      long l = iter.nextLong();
      int h = (int) ((l >>> 32) ^ l) * MIXER;

      long bits = _filter[h & _mask];
      bits |= ((1L << (h >>> 26)));
      bits |= ((1L << ((h >> 20) & 0x3F)));
View Full Code Here

    return true;
  }

  public boolean containsAll(LongCollection c) {
    final LongIterator i = c.iterator();
    int n = c.size();
    while (n-- != 0)
      if (!contains(i.nextLong()))
        return false;
    return true;
  }
View Full Code Here

  }

  @Override
  public void write(DataOutput out) throws IOException {
    out.writeInt(neighbors.size());
    LongIterator neighborsIt = neighbors.iterator();
    while (neighborsIt.hasNext()) {
      out.writeLong(neighborsIt.nextLong());
    }
  }
View Full Code Here

  }

  @Override
  public void write(DataOutput out) throws IOException {
    out.writeInt(neighbors.size());
    LongIterator neighborsIt = neighbors.iterator();
    DoubleIterator edgeValuesIt = edgeValues.iterator();
    while (neighborsIt.hasNext()) {
      out.writeLong(neighborsIt.nextLong());
      out.writeDouble(edgeValuesIt.nextDouble());
    }
  }
View Full Code Here

  }

  @Override
  public void write(DataOutput out) throws IOException {
    out.writeInt(neighbors.size());
    LongIterator neighborsIt = neighbors.iterator();
    while (neighborsIt.hasNext()) {
      out.writeLong(neighborsIt.nextLong());
    }
  }
View Full Code Here

            try {
                Closer closer = Closer.create();
                try {
                    PrintWriter writer = closer.register(new PrintWriter(file));
                    LongSet ids = getIds();
                    LongIterator iter = ids.iterator();
                    while (iter.hasNext()) {
                        writer.println(iter.nextLong());
                    }
                } catch (Throwable th) {
                    throw closer.rethrow(th);
                } finally {
                    closer.close();
View Full Code Here

    public SlopeOneModelDataAccumulator(double damping, ItemDAO dao) {
        this.damping = damping;
        LongSet items = dao.getItemIds();

        workMatrix = new Long2ObjectOpenHashMap<MutableSparseVector>(items.size());
        LongIterator iter = items.iterator();
        while (iter.hasNext()) {
            long item = iter.nextLong();
            workMatrix.put(item, MutableSparseVector.create(items));
            workMatrix.get(item).addChannelVector(SlopeOneModel.CORATINGS_SYMBOL);
        }
    }
View Full Code Here

    @Override
    public Result doMeasureUser(TestUser user, Context context) {
        double score = 0;

        LongSet items = queryItems.select(user);
        LongIterator it = items.iterator();
        while (it.hasNext()) {
            final long l = it.nextLong();
            ItemSelector finalCandidates = ItemSelectors.union(ItemSelectors.fixed(l), candidates);

            List<ScoredId> recs = user.getRecommendations(listSize, finalCandidates, exclude);
            for (ScoredId s : recs) {
                if (s.getId() == l) {
View Full Code Here

TOP

Related Classes of it.unimi.dsi.fastutil.longs.LongIterator

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.