Does the linear interpolation with the next sample
@since 06.06.2006
@param currentTuningPos
@return
161376
private int getLinearInterpolated(final int currentSamplePos, final int currentTuningPos)
	{
		final long s1 = ((long)sample[currentSamplePos  ])<<Helpers.SAMPLE_SHIFT;
		final long s2 = ((long)sample[currentSamplePos+1])<<Helpers.SAMPLE_SHIFT;
		return (int)((s1 + (((s2-s1)*((long)currentTuningPos))>>Helpers.SHIFT))>>Helpers.SAMPLE_SHIFT);
	}
947823
public void setCurrentPosition(int position, boolean smooth) {
        if (getRealAdapter() == null)
            throw new IllegalStateException("You did not set a slider adapter");
        if(position >= getRealAdapter().getCount()){
            throw new IllegalStateException("Item position is not exist");
        }
        int p = mViewPager.getCurrentItem() % getRealAdapter().getCount();
        int n = (position - p) + mViewPager.getCurrentItem();
        mViewPager.setCurrentItem(n, smooth);
    }
52297
private double fillInterpolatedValues(InterpolationType interpolationType) {
		double interpolatedValue = 0;
		if (shouldDoInterpolation(true)) {

			double y1 = values[indexToInterpolate];

			if (current == indexToInterpolate) {
				return y1;
			}

			long x = timestamps[current];
			long x1 = timestamps[indexToInterpolate];
			if (x == x1) {
				return y1;
			}
			int next = indexToInterpolate + iterators.length;
			double y2 = values[next];
			long x2 = timestamps[next];
			if (x == x2) {
				return y2;
			}

			switch(interpolationType){
			case LININT:
				interpolatedValue = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
				break;
			case ZIMSUM:
				interpolatedValue = 0;
				break;
			default:
				throw new IllegalArgumentException("Invalid interpolation type specified");
			}
		}
		return interpolatedValue;
	}
177842
private int getCurrentRecord()
    {
        //Get the current time
        long currentTime = System.currentTimeMillis();

        //How far along has the test run?
        long currentDuration=currentTime-startTime;
        //How far along the test are we?
        double currentRelativePosition=(currentDuration/1000d)/testDurationInSeconds;
        //determine the position of the test window
        double currentRecordRaw=currentRelativePosition*(numKeys-windowSize);

        Long currentRecord=Math.round(currentRecordRaw);

        return currentRecord.intValue();
    }
553673
private long getCurrentPosition() {
        long pos;
        if (!useLoadBuf) {
            return in.position();
        }
        try {
            if (in != null) {
                pos = (channel.position() - in.remaining());
            } else {
                pos = channel.position();
            }
            return pos;
        } catch (Exception e) {
            log.error("Error getCurrentPosition", e);
            return 0;
        }
    }
75946
@Override
  public int nextStartPosition() throws IOException {
    if (currentStartPosition < minPosition) {
      currentStartPosition = minPosition;
      currentEndPosition = currentStartPosition + 1;
    } else {
      currentStartPosition++;
      currentEndPosition = currentStartPosition + 1;
      if (currentStartPosition > maxPosition) {
        currentStartPosition = NO_MORE_POSITIONS;
        currentEndPosition = NO_MORE_POSITIONS;
      }
    }
    return currentStartPosition;
  }
789965
public SoundCloudTrack getCurrentTrack() {
        if (mCurrentTrackIndex > -1 && mCurrentTrackIndex < mSoundCloudPlaylist.getTracks().size()) {
            return mSoundCloudPlaylist.getTracks().get(mCurrentTrackIndex);
        }
        return null;
    }
806679
@Override
  public double getMapRecordProcessingRate(long currentTime) {
    @SuppressWarnings("deprecation")
    long bytesProcessed = super.getCounters().findCounter
        (Task.Counter.MAP_INPUT_RECORDS).getCounter();
    return calculateRate(bytesProcessed, currentTime);
  }
572985
public static void setCurrent(SiteContext current) {
        threadLocal.set(current);

        MDC.put(SITE_NAME_MDC_KEY, current.getSiteName());
    }
1037538
public double resample(final double samples, final Timebase oldRate)
	{
		if (samples == 0)
		{
			return 0;
		}
		else if (!this.equals(oldRate))
		{
			final double resampled = resample(samples, oldRate, this);

			return resampled;
		}
		else
		{
			return samples;
		}
	}
1337773
public static double getCurrentStyleFloat(Element element, Style style) {

        String currentStyle = getCurrentStyle(element, style);
        return CmsClientStringUtil.parseFloat(currentStyle);
    }
1312547
function() {

		var interpolants = this._controlInterpolants,
			lastActiveIndex = this._nActiveControlInterpolants ++,
			interpolant = interpolants[ lastActiveIndex ];

		if ( interpolant === undefined ) {

			interpolant = new THREE.LinearInterpolant(
					new Float32Array( 2 ), new Float32Array( 2 ),
						1, this._controlInterpolantsResultBuffer );

			interpolant.__cacheIndex = lastActiveIndex;
			interpolants[ lastActiveIndex ] = interpolant;

		}

		return interpolant;

	}
1230488
public synchronized void update(double sample) {
        long now = System.currentTimeMillis();

        if (lastMillis == 0) {    // first sample
            average = sample;
            lastMillis = now;
            return;
        }
        long deltaTime = now - lastMillis;
        double coeff = Math.exp(-1.0 * ((double)deltaTime / windowMillis));
        average = (1.0 - coeff) * sample + coeff * average;

        lastMillis = now;
    }
3196
private void setCurrentLocationToNextValidPosition(Point aLocation)    {
        // set latest location to next valid position
        int i, j;
        i = aLocation.x;
        j = aLocation.y;
        do {
            if ( (j + 1)  == columns ) {    // goto next row
                i++;
                j = 0;
            }
            else {
                j++;
            }
        }
        while (
        (i < rows.size()) && (j < columns) && (((Row) rows.get(i)).isReserved(j))
        );
        curPosition = new Point(i, j);
    }
212222
private static MultiLineString linearZInterpolation(MultiLineString multiLineString) {
        int nbGeom = multiLineString.getNumGeometries();
        LineString[] lines = new LineString[nbGeom];
        for (int i = 0; i < nbGeom; i++) {
            LineString subGeom = (LineString) multiLineString.getGeometryN(i);
            double startz = subGeom.getStartPoint().getCoordinates()[0].z;
            double endz = subGeom.getEndPoint().getCoordinates()[0].z;
            double length = subGeom.getLength();
            subGeom.apply(new LinearZInterpolationFilter(startz, endz, length));
            lines[i] = subGeom;

        }
        return FACTORY.createMultiLineString(lines);
    }
1325550
@Override
    public boolean advanceNextPosition()
    {
        boolean needNextRows = !started || !nextRows.hasNext();

        if (!started) {
            started = true;
            nanoStart = System.nanoTime();
        }

        if (needNextRows) {
            currentRow = null;
            try {
                do {
                    if (!scanner.hasMoreRows()) {
                        return false;
                    }

                    nextRows = scanner.nextRows();
                }
                while (!nextRows.hasNext());
                log.debug("Fetched " + nextRows.getNumRows() + " rows");
            }
            catch (KuduException e) {
                throw new RuntimeException(e);
            }
        }

        currentRow = nextRows.next();
        totalBytes += getRowLength();
        return true;
    }
319168
@InterfaceAudience.Public
    public SavedRevision getCurrentRevision() {
        if (currentRevision == null)
            currentRevision = getRevision(null);
        return currentRevision;
    }