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 ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.