Examples of currentValue()


Examples of com.opengamma.timeseries.date.localdate.LocalDateDoubleEntryIterator.currentValue()

        if (getMode().equals(CalculationMode.STRICT)) {
          throw new TimeSeriesException("No data in second series for time " + iter1.currentTime());
        }
      } else {
        times[i] = iter1.currentTimeFast();
        returns[i++] = Math.log(iter1.currentValue() / value2);
      }
    }
    return getSeries(times, returns, i);
  }
View Full Code Here

Examples of com.opengamma.timeseries.date.localdate.LocalDateDoubleEntryIterator.currentValue()

    final double[] resultValues = new double[ts.size() - 1];
    int resultIndex = 0;

    final LocalDateDoubleEntryIterator it = ts.iterator();
    it.nextTimeFast();
    double previousValue = it.currentValue();

    double dividend;
    Double dividendTSData;
    while (it.hasNext()) {
      final int date = it.nextTimeFast();
View Full Code Here

Examples of com.opengamma.timeseries.date.localdate.LocalDateDoubleEntryIterator.currentValue()

    double dividend;
    Double dividendTSData;
    while (it.hasNext()) {
      final int date = it.nextTimeFast();
      final double value = it.currentValue();

      if (isValueNonZero(previousValue) && isValueNonZero(value)) {
        resultDates[resultIndex] = date;
        if (d == null) {
          dividend = 0;
View Full Code Here

Examples of com.opengamma.timeseries.date.localdate.LocalDateDoubleEntryIterator.currentValue()

        if (getMode().equals(CalculationMode.STRICT)) {
          throw new TimeSeriesException("No data in second series for time " + iter1.currentTime());
        }
      } else {
        times[i] = iter1.currentTimeFast();
        returns[i++] = (iter1.currentValue() / value2 - 1);
      }
    }
    return getSeries(times, returns, i);
  }
View Full Code Here

Examples of com.salesforce.phoenix.schema.Sequence.currentValue()

            .setSchemaName(sequenceKey.getSchemaName()).setTableName(sequenceKey.getSequenceName())
            .build().buildException();
        }
        sequence.getLock().lock();
        try {
            return sequence.currentValue(timestamp);
        } catch (EmptySequenceCacheException e) {
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_CALL_CURRENT_BEFORE_NEXT_VALUE)
            .setSchemaName(sequenceKey.getSchemaName()).setTableName(sequenceKey.getSequenceName())
            .build().buildException();
        } finally {
View Full Code Here

Examples of freenet.support.math.BootstrappingDecayingRunningAverage.currentValue()

          if(hopsTaken < 0) {
            failures++;
            avg.report(0.0);
            avg2.report(0.0);
            double ratio = (double) successes / ((double) (failures + successes));
            System.err.println("Routed ping " + pings + " FAILED from " + randomNode.getDarknetPortNumber() + " to " + randomNode2.getDarknetPortNumber() + " (long:" + ratio + ", short:" + avg.currentValue() + ", vague:" + avg2.currentValue() + ')');
          } else {
            totalHopsTaken += hopsTaken;
            successes++;
            avg.report(1.0);
            avg2.report(1.0);
View Full Code Here

Examples of freenet.support.math.BootstrappingDecayingRunningAverage.currentValue()

            totalHopsTaken += hopsTaken;
            successes++;
            avg.report(1.0);
            avg2.report(1.0);
            double ratio = (double) successes / ((double) (failures + successes));
            System.err.println("Routed ping " + pings + " success: " + hopsTaken + ' ' + randomNode.getDarknetPortNumber() + " to " + randomNode2.getDarknetPortNumber() + " (long:" + ratio + ", short:" + avg.currentValue() + ", vague:" + avg2.currentValue() + ')');
          }
        } catch(Throwable t) {
          Logger.error(RealNodeRoutingTest.class, "Caught " + t, t);
        }
      }
View Full Code Here

Examples of freenet.support.math.RunningAverage.currentValue()

  public synchronized void successfulBlockReceive(boolean realTimeFlag, boolean isLocal) {
    RunningAverage blockTransferPSuccess = realTimeFlag ? blockTransferPSuccessRT : blockTransferPSuccessBulk;
    blockTransferPSuccess.report(1.0);
    if(isLocal)
      blockTransferPSuccessLocal.report(1.0);
    if(logMINOR) Logger.minor(this, "Successful receives: "+blockTransferPSuccess.currentValue()+" count="+blockTransferPSuccess.countReports()+" realtime="+realTimeFlag);
  }

  public synchronized void failedBlockReceive(boolean normalFetch, boolean timeout, boolean realTimeFlag, boolean isLocal) {
    if(normalFetch) {
      blockTransferFailTimeout.report(timeout ? 1.0 : 0.0);
View Full Code Here

Examples of freenet.support.math.RunningAverage.currentValue()

    }
    RunningAverage blockTransferPSuccess = realTimeFlag ? blockTransferPSuccessRT : blockTransferPSuccessBulk;
    blockTransferPSuccess.report(0.0);
    if(isLocal)
      blockTransferPSuccessLocal.report(0.0);
    if(logMINOR) Logger.minor(this, "Successful receives: "+blockTransferPSuccess.currentValue()+" count="+blockTransferPSuccess.countReports()+" realtime="+realTimeFlag);
  }

  public void reportIncomingRequestLocation(double loc) {
    assert((loc > 0) && (loc < 1.0));
View Full Code Here

Examples of freenet.support.math.RunningAverage.currentValue()

          if(hopsTaken < 0) {
            failures++;
            avg.report(0.0);
            avg2.report(0.0);
            double ratio = (double) successes / ((double) (failures + successes));
            System.err.println("Routed ping " + pings + " FAILED from " + randomNode.getDarknetPortNumber() + " to " + randomNode2.getDarknetPortNumber() + " (long:" + ratio + ", short:" + avg.currentValue() + ", vague:" + avg2.currentValue() + ')');
          } else {
            totalHopsTaken += hopsTaken;
            successes++;
            avg.report(1.0);
            avg2.report(1.0);
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.