Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Estimate ¶
func Estimate(fe *FilterEstimate) big.Int
Returns the Q.0 position estimate of the filter
func Extrapolate ¶
func Extrapolate(fe *FilterEstimate, delta abi.ChainEpoch) big.Int
Extrapolate filter "position" delta epochs in the future. Note this is currently only used in testing. Output is Q.256 format for use in numerator of ratio in test caller
func ExtrapolatedCumSumOfRatio ¶
func ExtrapolatedCumSumOfRatio(delta abi.ChainEpoch, relativeStart abi.ChainEpoch, estimateNum, estimateDenom FilterEstimate) big.Int
Extrapolate the CumSumRatio given two filters. Output is in Q.128 format
Types ¶
type AlphaBetaFilter ¶
type AlphaBetaFilter struct {
// contains filtered or unexported fields
}
func LoadFilter ¶
func LoadFilter(prevEstimate FilterEstimate, alpha, beta big.Int) *AlphaBetaFilter
func (*AlphaBetaFilter) NextEstimate ¶
func (f *AlphaBetaFilter) NextEstimate(observation big.Int, epochDelta abi.ChainEpoch) FilterEstimate
type FilterEstimate ¶
type FilterEstimate = smoothing6.FilterEstimate
Alpha Beta Filter "position" (value) and "velocity" (rate of change of value) estimates Estimates are in Q.128 format
type FilterEstimate struct { PositionEstimate big.Int // Q.128 VelocityEstimate big.Int // Q.128 }
func DefaultInitialEstimate ¶
func DefaultInitialEstimate() FilterEstimate
func NewEstimate ¶
func NewEstimate(position, velocity big.Int) FilterEstimate
Create a new filter estimate given two Q.0 format ints.
func TestingConstantEstimate ¶
func TestingConstantEstimate(val big.Int) FilterEstimate
Returns an estimate with position val and velocity 0
func TestingEstimate ¶
func TestingEstimate(x, v big.Int) FilterEstimate
Returns and estimate with postion x and velocity v
Click to show internal directories.
Click to hide internal directories.