Documentation ¶
Index ¶
- type SummaryStatistics
- func (s *SummaryStatistics) Add(value, count float64)
- func (s *SummaryStatistics) AddToCount(addend float64)
- func (s *SummaryStatistics) AddToSum(addend float64)
- func (s *SummaryStatistics) Clear()
- func (s *SummaryStatistics) Copy() *SummaryStatistics
- func (s *SummaryStatistics) Count() float64
- func (s *SummaryStatistics) Max() float64
- func (s *SummaryStatistics) MergeWith(o *SummaryStatistics)
- func (s *SummaryStatistics) Min() float64
- func (s *SummaryStatistics) Rescale(factor float64)
- func (s *SummaryStatistics) Reweight(factor float64)
- func (s *SummaryStatistics) Sum() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SummaryStatistics ¶
type SummaryStatistics struct {
// contains filtered or unexported fields
}
SummaryStatistics keeps track of the count, the sum, the min and the max of recorded values. We use a compensated sum to avoid accumulating rounding errors (see https://en.wikipedia.org/wiki/Kahan_summation_algorithm).
func NewSummaryStatistics ¶
func NewSummaryStatistics() *SummaryStatistics
func (*SummaryStatistics) Add ¶
func (s *SummaryStatistics) Add(value, count float64)
func (*SummaryStatistics) AddToCount ¶
func (s *SummaryStatistics) AddToCount(addend float64)
func (*SummaryStatistics) AddToSum ¶
func (s *SummaryStatistics) AddToSum(addend float64)
func (*SummaryStatistics) Clear ¶
func (s *SummaryStatistics) Clear()
func (*SummaryStatistics) Copy ¶
func (s *SummaryStatistics) Copy() *SummaryStatistics
func (*SummaryStatistics) Count ¶
func (s *SummaryStatistics) Count() float64
func (*SummaryStatistics) Max ¶
func (s *SummaryStatistics) Max() float64
func (*SummaryStatistics) MergeWith ¶
func (s *SummaryStatistics) MergeWith(o *SummaryStatistics)
func (*SummaryStatistics) Min ¶
func (s *SummaryStatistics) Min() float64
func (*SummaryStatistics) Rescale ¶
func (s *SummaryStatistics) Rescale(factor float64)
Rescale adjusts the statistics so that they are equal to what they would have been if AddWithCount had been called with values multiplied by factor.
func (*SummaryStatistics) Reweight ¶
func (s *SummaryStatistics) Reweight(factor float64)
Reweight adjusts the statistics so that they are equal to what they would have been if AddWithCount had been called with counts multiplied by factor.
func (*SummaryStatistics) Sum ¶
func (s *SummaryStatistics) Sum() float64
Click to show internal directories.
Click to hide internal directories.