Documentation ¶
Index ¶
- Constants
- Variables
- func Any(t Time, v1, v2 float32) float32
- func Defined(t Time, v float32) float32
- func IsInf(f float32, sign int) bool
- func IsNaN(v float32) bool
- func LastNotNaN(t Time, v1, v2 float32) float32
- func Max(t Time, max, v float32) float32
- func Min(t Time, min, v float32) float32
- func NanCount(t Time, count, v float32) float32
- func NanSum(t Time, sum, v float32) float32
- func NanToZero(t Time, v float32) float32
- func ZeroToNan(t Time, v float32) float32
- type Aggregate
- type Context
- type Duration
- type F
- type Iterator
- type LinearRegression
- type Time
- func (t Time) Add(d Duration) Time
- func (t Time) After(other Time) bool
- func (t Time) Before(other Time) bool
- func (t Time) IsZero() bool
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) String() string
- func (t Time) Sub(other Time) Duration
- func (t Time) ToStandard() time.Time
- func (t Time) Truncate(d Duration) Time
- func (t *Time) UnmarshalJSON(b []byte) error
- type TimeSeries
- func Aggregate2(x, y *TimeSeries, f func(x, y float32) float32) *TimeSeries
- func Div(x, y *TimeSeries) *TimeSeries
- func Increase(x, status *TimeSeries) *TimeSeries
- func Mul(x, y *TimeSeries) *TimeSeries
- func New(from Time, pointsCount int, step Duration) *TimeSeries
- func NewWithData(from Time, step Duration, data []float32) *TimeSeries
- func Sub(x, y *TimeSeries) *TimeSeries
- func Sum(x, y *TimeSeries) *TimeSeries
- func (ts *TimeSeries) Fill(from Time, step Duration, data []float32) bool
- func (ts *TimeSeries) Get() *TimeSeries
- func (ts *TimeSeries) IsEmpty() bool
- func (ts *TimeSeries) Iter() *Iterator
- func (ts *TimeSeries) IterFrom(from Time) *Iterator
- func (ts *TimeSeries) Last() float32
- func (ts *TimeSeries) LastNotNull() (Time, float32)
- func (ts *TimeSeries) Len() int
- func (ts *TimeSeries) Map(f func(t Time, v float32) float32) *TimeSeries
- func (ts *TimeSeries) MapInPlace(f func(t Time, v float32) float32) *TimeSeries
- func (ts *TimeSeries) MarshalJSON() ([]byte, error)
- func (ts *TimeSeries) NewWithData(data []float32) *TimeSeries
- func (ts *TimeSeries) Reduce(f F) float32
- func (ts *TimeSeries) Set(t Time, v float32)
- func (ts *TimeSeries) String() string
- func (ts *TimeSeries) TailIsEmpty() bool
- func (ts *TimeSeries) WithNewValue(newValue float32) *TimeSeries
- type Value
Constants ¶
Variables ¶
View Source
var NaN = float32(math.NaN())
Functions ¶
func LastNotNaN ¶
Types ¶
type Aggregate ¶
type Aggregate struct {
// contains filtered or unexported fields
}
func NewAggregate ¶
func (*Aggregate) Add ¶
func (a *Aggregate) Add(tss ...*TimeSeries) *Aggregate
func (*Aggregate) Get ¶
func (a *Aggregate) Get() *TimeSeries
func (*Aggregate) MarshalJSON ¶
type Duration ¶
type Duration int64
func (Duration) MarshalJSON ¶
func (Duration) ToStandard ¶
func (*Duration) UnmarshalJSON ¶
type LinearRegression ¶
type LinearRegression struct {
// contains filtered or unexported fields
}
func NewLinearRegression ¶
func NewLinearRegression(ts *TimeSeries) *LinearRegression
func (*LinearRegression) Calc ¶
func (lr *LinearRegression) Calc(t Time) float32
type Time ¶
type Time int64
func (Time) MarshalJSON ¶
func (Time) ToStandard ¶
func (*Time) UnmarshalJSON ¶
type TimeSeries ¶
type TimeSeries struct {
// contains filtered or unexported fields
}
func Aggregate2 ¶
func Aggregate2(x, y *TimeSeries, f func(x, y float32) float32) *TimeSeries
func Div ¶
func Div(x, y *TimeSeries) *TimeSeries
func Increase ¶
func Increase(x, status *TimeSeries) *TimeSeries
func Mul ¶
func Mul(x, y *TimeSeries) *TimeSeries
func NewWithData ¶
func NewWithData(from Time, step Duration, data []float32) *TimeSeries
func Sub ¶
func Sub(x, y *TimeSeries) *TimeSeries
func Sum ¶
func Sum(x, y *TimeSeries) *TimeSeries
func (*TimeSeries) Get ¶
func (ts *TimeSeries) Get() *TimeSeries
func (*TimeSeries) IsEmpty ¶
func (ts *TimeSeries) IsEmpty() bool
func (*TimeSeries) Iter ¶
func (ts *TimeSeries) Iter() *Iterator
func (*TimeSeries) IterFrom ¶ added in v0.22.0
func (ts *TimeSeries) IterFrom(from Time) *Iterator
func (*TimeSeries) Last ¶
func (ts *TimeSeries) Last() float32
func (*TimeSeries) LastNotNull ¶
func (ts *TimeSeries) LastNotNull() (Time, float32)
func (*TimeSeries) Len ¶
func (ts *TimeSeries) Len() int
func (*TimeSeries) Map ¶
func (ts *TimeSeries) Map(f func(t Time, v float32) float32) *TimeSeries
func (*TimeSeries) MapInPlace ¶ added in v0.22.0
func (ts *TimeSeries) MapInPlace(f func(t Time, v float32) float32) *TimeSeries
func (*TimeSeries) MarshalJSON ¶
func (ts *TimeSeries) MarshalJSON() ([]byte, error)
func (*TimeSeries) NewWithData ¶ added in v0.17.12
func (ts *TimeSeries) NewWithData(data []float32) *TimeSeries
func (*TimeSeries) Reduce ¶
func (ts *TimeSeries) Reduce(f F) float32
func (*TimeSeries) Set ¶
func (ts *TimeSeries) Set(t Time, v float32)
func (*TimeSeries) String ¶
func (ts *TimeSeries) String() string
func (*TimeSeries) TailIsEmpty ¶ added in v0.22.0
func (ts *TimeSeries) TailIsEmpty() bool
func (*TimeSeries) WithNewValue ¶
func (ts *TimeSeries) WithNewValue(newValue float32) *TimeSeries
Click to show internal directories.
Click to hide internal directories.