interpolators

package
v0.0.0-...-5e0ed37 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Closest = &datasets.Interpolator{
	Name:        "closest",
	Description: "Returns the datapoint with the closest timestamp to the reference timestamp",
	Constructor: func(name string, options map[string]interface{}, reference *pipescript.BufferIterator, stream pipescript.Iterator) (pipescript.Iterator, error) {
		dp1, err := stream.Next(&pipescript.Datapoint{})
		if err != nil || dp1 == nil {
			return pipescript.EmptyIterator{}, nil
		}
		dp2, err := stream.Next(&pipescript.Datapoint{})
		return &closestInterpolator{
			reference: reference,
			stream:    stream,
			prev:      dp1,
			next:      dp2,
		}, err
	},
}

Functions

func Register

func Register()

Types

This section is empty.

Jump to

Keyboard shortcuts

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