smoothing

package
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultAlpha big.Int // Q.128 value of 9.25e-4
	DefaultBeta  big.Int // Q.128 value of 2.84e-7

	ExtrapolatedCumSumRatioEpsilon big.Int // Q.128 value of 2^-50
)

Functions

func Estimate

func Estimate(fe *FilterEstimate) big.Int

Returns the Q.0 position estimate of the filter

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 FilterEstimate

type FilterEstimate struct {
	PositionEstimate big.Int // Q.128
	VelocityEstimate big.Int // Q.128
}

Alpha Beta Filter "position" (value) and "velocity" (rate of change of value) estimates Estimates are in Q.128 format

func NewEstimate

func NewEstimate(position, velocity big.Int) FilterEstimate

Create a new filter estimate given two Q.0 format ints.

func (*FilterEstimate) MarshalCBOR

func (t *FilterEstimate) MarshalCBOR(w io.Writer) error

func (*FilterEstimate) UnmarshalCBOR

func (t *FilterEstimate) UnmarshalCBOR(r io.Reader) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL