fastrends

package module
v0.0.0-...-3c8a885 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2017 License: MIT Imports: 0 Imported by: 2

README

fastrends

CircleCI

Fast central tendency value calculator

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TrendFloat32

type TrendFloat32 struct {
	Max   float32
	Min   float32
	Mode  float32
	Sum   float32
	Count int
	// contains filtered or unexported fields
}

TrendFloat32 : statistic data

func NewTrendFloat32

func NewTrendFloat32() *TrendFloat32

NewTrendFloat32 : TrendFloat32 contructor

func (*TrendFloat32) Add

func (trend *TrendFloat32) Add(value float32)

Add : it adds a value to the structure

func (*TrendFloat32) Avg

func (trend *TrendFloat32) Avg() float32

Avg : return the aritmetic mean value from the structure

func (*TrendFloat32) Sub

func (trend *TrendFloat32) Sub(value float32)

Sub : it substracts a singlea value from the structure TODO : this early version will break max min and mode values if the substracted values is equal to one of these

func (*TrendFloat32) WeightedAvg

func (trend *TrendFloat32) WeightedAvg() float32

WeightedAvg : return the weighted aritmetic mean value value from the structure

type TrendFloat64

type TrendFloat64 struct {
	Max   float64
	Min   float64
	Mode  float64
	Sum   float64
	Count int
	// contains filtered or unexported fields
}

TrendFloat64 : statistic data

func NewTrendFloat64

func NewTrendFloat64() *TrendFloat64

NewTrendFloat64 : TrendFloat64 contructor

func (*TrendFloat64) Add

func (trend *TrendFloat64) Add(value float64)

Add : it adds a value to the structure

func (*TrendFloat64) Avg

func (trend *TrendFloat64) Avg() float64

Avg : return the aritmetic mean value from the structure

func (*TrendFloat64) Sub

func (trend *TrendFloat64) Sub(value float64)

Sub : it substracts a singlea value from the structure TODO : this early version will break max min and mode values if the substracted values is equal to one of these

func (*TrendFloat64) WeightedAvg

func (trend *TrendFloat64) WeightedAvg() float64

WeightedAvg : return the weighted aritmetic mean value value from the structure

type TrendInt

type TrendInt struct {
	Max   int
	Min   int
	Mode  int
	Sum   int
	Count int
	// contains filtered or unexported fields
}

TrendInt : statistic data

func NewTrendInt

func NewTrendInt() *TrendInt

NewTrendInt : TrendInt contructor

func (*TrendInt) Add

func (trend *TrendInt) Add(value int)

Add : it adds a value to the structure

func (*TrendInt) Avg

func (trend *TrendInt) Avg() int

Avg : return the aritmetic mean value from the structure

func (*TrendInt) Sub

func (trend *TrendInt) Sub(value int)

Sub : it substracts a singlea value from the structure TODO : this early version will break max min and mode values if the substracted values is equal to one of these

func (*TrendInt) WeightedAvg

func (trend *TrendInt) WeightedAvg() int

WeightedAvg : return the weighted aritmetic mean value value from the structure

type TrendInt32

type TrendInt32 struct {
	Max   int32
	Min   int32
	Mode  int32
	Sum   int32
	Count int
	// contains filtered or unexported fields
}

TrendInt32 : statistic data

func NewTrendInt32

func NewTrendInt32() *TrendInt32

NewTrendInt32 : TrendInt32 contructor

func (*TrendInt32) Add

func (trend *TrendInt32) Add(value int32)

Add : it adds a value to the structure

func (*TrendInt32) Avg

func (trend *TrendInt32) Avg() int32

Avg : return the aritmetic mean value from the structure

func (*TrendInt32) Sub

func (trend *TrendInt32) Sub(value int32)

Sub : it substracts a singlea value from the structure TODO : this early version will break max min and mode values if the substracted values is equal to one of these

func (*TrendInt32) WeightedAvg

func (trend *TrendInt32) WeightedAvg() int32

WeightedAvg : return the weighted aritmetic mean value value from the structure

type TrendInt64

type TrendInt64 struct {
	Max   int64
	Min   int64
	Mode  int64
	Sum   int64
	Count int
	// contains filtered or unexported fields
}

TrendInt64 : statistic data

func NewTrendInt64

func NewTrendInt64() *TrendInt64

NewTrendInt64 : TrendInt64 contructor

func (*TrendInt64) Add

func (trend *TrendInt64) Add(value int64)

Add : it adds a value to the structure

func (*TrendInt64) Avg

func (trend *TrendInt64) Avg() int64

Avg : return the aritmetic mean value from the structure

func (*TrendInt64) Sub

func (trend *TrendInt64) Sub(value int64)

Sub : it substracts a singlea value from the structure TODO : this early version will break max min and mode values if the substracted values is equal to one of these

func (*TrendInt64) WeightedAvg

func (trend *TrendInt64) WeightedAvg() int64

WeightedAvg : return the weighted aritmetic mean value value from the structure

type TrendUint

type TrendUint struct {
	Max   uint
	Min   uint
	Mode  uint
	Sum   uint
	Count int
	// contains filtered or unexported fields
}

TrendUint : statistic data

func NewTrendUint

func NewTrendUint() *TrendUint

NewTrendUint : TrendUint contructor

func (*TrendUint) Add

func (trend *TrendUint) Add(value uint)

Add : it adds a value to the structure

func (*TrendUint) Avg

func (trend *TrendUint) Avg() uint

Avg : return the aritmetic mean value from the structure

func (*TrendUint) Sub

func (trend *TrendUint) Sub(value uint)

Sub : it substracts a singlea value from the structure TODO : this early version will break max min and mode values if the substracted values is equal to one of these

func (*TrendUint) WeightedAvg

func (trend *TrendUint) WeightedAvg() uint

WeightedAvg : return the weighted aritmetic mean value value from the structure

Jump to

Keyboard shortcuts

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