Examples of increment()


Examples of java.util.concurrent.atomic.LongAdder.increment()

        Set<String> seen = Collections.newSetFromMap(new ConcurrentHashMap<>());
        long start = System.currentTimeMillis();
        IntStream.range(0, count).parallel().forEach(i -> {
            String element = String.valueOf(r.nextInt(items));
            if (b.contains(element) && !seen.contains(element))
                fp.increment();
            b.add(element);
            seen.add(element);
        });
        double fprate = 100.0 * fp.intValue() / count;
        System.out.println("False Positives = " + fp + ", FP-Rate = " + fprate);
View Full Code Here

Examples of kea.util.Counter.increment()

        String phrase = it.next();
        Counter counter = m_Dictionary.get(phrase);
        if (counter == null) {
          m_Dictionary.put(phrase, new Counter());
        } else {
          counter.increment();
        }
      }
    }

    if (m_KFused) {      
View Full Code Here

Examples of maui.util.Counter.increment()

      for (String candidateName : candidates.keySet()) {
        Counter counter = globalDictionary.get(candidateName);
        if (counter == null) {
          globalDictionary.put(candidateName, new Counter());
        } else {
          counter.increment();
        }
      }
    }

    if (debugMode) {
View Full Code Here

Examples of net.floodlightcontroller.counter.ICounter.increment()

            }
            ICounter counter = counterStore.getCounter(counterName);
            if (counter == null) {
                counter = counterStore.createCounter(counterName, CounterType.LONG);
            }
            counter.increment();
        }
    }
   
    @Override
    public abstract IQuery createQuery(String tableName, String[] columnNames,
View Full Code Here

Examples of net.floodlightcontroller.counter.SimpleCounter.increment()

                            "We are testing exception catching."));
       
        SimpleCounter cnt = (SimpleCounter)SimpleCounter.createCounter(
                            new Date(),
                            CounterType.LONG);
        cnt.increment();
        expect(counterStore.getCounter(
                flowReconcileMgr.controllerPktInCounterName))
                .andReturn(cnt)
                .anyTimes();
       
View Full Code Here

Examples of net.kuujo.vertigo.cluster.data.AsyncCounter.increment()

        data.incrementAndGet(new Handler<AsyncResult<Long>>() {
          @Override
          public void handle(AsyncResult<Long> result) {
            assertTrue(result.succeeded());
            assertTrue(result.result() == 1);
            data.increment(new Handler<AsyncResult<Void>>() {
              @Override
              public void handle(AsyncResult<Void> result) {
                assertTrue(result.succeeded());
                data.get(new Handler<AsyncResult<Long>>() {
                  @Override
View Full Code Here

Examples of net.myrrix.common.collection.FastByIDFloatMap.increment()

              FastIDSet itemIDs = entry.getValue();
              synchronized (itemIDs) {
                LongPrimitiveIterator it = itemIDs.iterator();
                while (it.hasNext()) {
                  long itemID = it.nextLong();
                  itemCounts.increment(itemID, 1.0f);
                }
              }
            }
          }
         
View Full Code Here

Examples of net.myrrix.common.stats.DoubleWeightedMean.increment()

      long userID = entry.getKey();
      RecommendedItem itemPref = entry.getValue();
      try {
        float estimate = recommender.estimatePreference(userID, itemPref.getItemID());
        Preconditions.checkState(LangUtils.isFinite(estimate));
        score.increment(1.0 - estimate, itemPref.getValue());
      } catch (NoSuchItemException nsie) {
        // continue
      } catch (NoSuchUserException nsue) {
        // continue
      }
View Full Code Here

Examples of net.sf.joafip.entity.MutableInteger.increment()

    MutableInteger count = referencedSet.get(dataRecordIdentifier);
    if (count == null) {
      count = new MutableInteger();
      referencedSet.put(dataRecordIdentifier, count);
    }
    count.increment();
  }

  public void addReferenced(final DataRecordIdentifier dataRecordIdentifier,
      final int linkCount) {
    MutableInteger count = referencedSet.get(dataRecordIdentifier);
View Full Code Here

Examples of opennlp.maxent.Counter.increment()

        StringTokenizer st = new StringTokenizer(s);
        while(st.hasMoreTokens()) {
          String tok = (String)split(st.nextToken()).a;
          Counter c = (Counter)map.get(tok);
          if(c!=null)
            c.increment();
          else
            map.put(tok, new Counter());
        }
      }
    } catch (IOException e) { e.printStackTrace(); }
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.