Help us shape the future of Go! Take the 2026 Go Developer Survey

rdp

package
v0.188.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownSampleRetention

func DownSampleRetention(ipdata []Point, startIndex int64, endIndex int64, weights []float64) []float64

func FindFarthestPoint

func FindFarthestPoint(line ConnectLine, ipdata []Point) (farthestPointIndex int, farthestPointDistanceFromLine float64)

Types

type ConnectLine

type ConnectLine struct {
	Starting Point
	Ending   Point
}

func (ConnectLine) Coefficients

func (l ConnectLine) Coefficients() (a, b, c float64)

type Point

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

func DownSampleIpdata

func DownSampleIpdata(ipdata []Point, epsilon float64) []Point

func DownSampleIpdataAuto

func DownSampleIpdataAuto(ipdata []Point) []Point

type Rdp

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

func New

func New(timeColumn string, valColumn string, threshold float64, retentionPercent float64, alloc memory.Allocator) *Rdp

func (*Rdp) Do

func (r *Rdp) Do(vs *array.Float, ts *array.Float) (*array.Int, *array.Float, error)

func (*Rdp) SplitCoordinates

func (r *Rdp) SplitCoordinates(sampledPoints []Point) (*array.Int, *array.Float)

func (*Rdp) ToPoints

func (r *Rdp) ToPoints() []Point

Jump to

Keyboard shortcuts

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