counter

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

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

Counter takes a discretized TSState and counts the transition matrix

func NewCounter

func NewCounter(history int, states int, buffersize int, profiler api.TSProfiler) Counter

NewCounter initializes and returns a new Counter

func (*Counter) Count

func (counter *Counter) Count(tsstates []models.TSState)

Count takes a discretized Buffer represented as TSStates for each metric and increases the counter

func (*Counter) GetStats

func (counter *Counter) GetStats() map[string]models.TSStats

GetStats returns the counter's current statistics as TSStats per metric

func (*Counter) GetTx

func (counter *Counter) GetTx() []models.TxMatrix

GetTx returns the probability matrix for each metric

func (*Counter) Likeliness

func (counter *Counter) Likeliness(next []models.TSState) float32

Likeliness returns the probability [0,1] for the state change from historic previous to next TSState

func (*Counter) Reset

func (counter *Counter) Reset()

Reset clears the counters, state, and stats

func (*Counter) ResetCounters

func (counter *Counter) ResetCounters()

ResetCounters clears the counters only

func (*Counter) ResetStats

func (counter *Counter) ResetStats()

ResetStats clears the stats only

func (*Counter) Totalcounts

func (counter *Counter) Totalcounts() int64

Totalcounts returns the summed up total amount of counter values

func (*Counter) Update

func (counter *Counter) Update(states int)

Update sets the new config settings to the counter

Jump to

Keyboard shortcuts

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