Class: shaka.abr.Ewma

Constructor

new Ewma(halfLife)

Computes an exponentionally-weighted moving average.
Parameters:
Name Type Description
halfLife number The quantity of prior samples (by weight) used when creating a new estimate. Those prior samples make up half of the new estimate.
Source:

Members

(private) alpha_ :number

Larger values of alpha expire historical data more slowly.
Type:
  • number
Source:

(private) estimate_ :number

Type:
  • number
Source:

(private) totalWeight_ :number

Type:
  • number
Source:

Methods

getEstimate() → {number}

Source:
Returns:
Type
number

sample(weight, value)

Takes a sample.
Parameters:
Name Type Description
weight number
value number
Source: