filters

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Camm

type Camm struct {
	sync.RWMutex
	Filter
	// contains filtered or unexported fields
}

func (*Camm) Current

func (filter *Camm) Current() float64

func (*Camm) Name

func (filter *Camm) Name() string

func (*Camm) Process

func (filter *Camm) Process(s float64) float64

type Filter

type Filter interface {
	Process(s float64) float64
	Current() float64
	Name() string
}

interface for filter modules

func NewCamm

func NewCamm(start float64, nMedian uint64, nWMA uint64) Filter

func NewSMM

func NewSMM(start float64, n uint64) Filter

func NewWMA

func NewWMA(start float64, n uint64) Filter

type IIR

type IIR struct {
	// contains filtered or unexported fields
}

sample storage

func (*IIR) Filter

func (f *IIR) Filter(x float64) float64

filter - loops unrolled

type SMM

type SMM struct {
	sync.RWMutex
	Filter
	// contains filtered or unexported fields
}

func (*SMM) Current

func (filter *SMM) Current() float64

func (*SMM) Name

func (filter *SMM) Name() string

func (*SMM) Process

func (filter *SMM) Process(s float64) float64

type WMA

type WMA struct {
	sync.RWMutex
	Filter
	// contains filtered or unexported fields
}

func (*WMA) Current

func (filter *WMA) Current() float64

func (*WMA) Name

func (filter *WMA) Name() string

func (*WMA) Process

func (filter *WMA) Process(s float64) float64

Jump to

Keyboard shortcuts

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