Documentation ¶
Index ¶
- func Odds(p float64) float64
- func Propability(o float64) float64
- func Propability2(yes float64, no float64) float64
- type Hist
- func (h *Hist) Exponate()
- func (h *Hist) Fraction(factor float64)
- func (h *Hist) Freq(value interface{}) (freq float64, ok bool)
- func (h *Hist) Freqs() []float64
- func (h *Hist) Get(item interface{}) (i interface{}, res float64)
- func (h *Hist) GetBig(item interface{}) (interface{}, *big.Float)
- func (h *Hist) Incr(factor float64)
- func (h *Hist) MaxFreq() (item interface{}, res float64)
- func (h *Hist) Remove(item interface{})
- func (h *Hist) Scale(factor float64)
- func (h *Hist) ScaleBig(factor *big.Float)
- func (h *Hist) Substract(other *Hist)
- func (h *Hist) Total() float64
- type Interpolator
- type OrderedHist
- type Pmf
- type SortedHist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Propability ¶
Computes the Propability given its odds Example: o=2 means 2:1 odds in favor, or 2/3 propability
func Propability2 ¶
Types ¶
type Hist ¶
func NewHistogram ¶
type Interpolator ¶
type Interpolator struct {
// contains filtered or unexported fields
}
func NewInterpolator ¶
func NewInterpolator(x []float64, y []float64) *Interpolator
func (*Interpolator) Lookup ¶
func (i *Interpolator) Lookup(x float64)
type OrderedHist ¶
type OrderedHist struct { Hist // contains filtered or unexported fields }
func NewOrderedHistFromFloat ¶
func NewOrderedHistFromFloat(values []float32) (o *OrderedHist, ok bool)
func (*OrderedHist) Get ¶
func (oh *OrderedHist) Get(v float32) (key float32, value interface{})
func (*OrderedHist) Keys ¶
func (oh *OrderedHist) Keys() []float32
type Pmf ¶
type Pmf struct {
SortedHist
}
type SortedHist ¶
type SortedHist struct {
// contains filtered or unexported fields
}
func CreateSortedHist ¶
func CreateSortedHist(h *Hist) (sh *SortedHist)
func NewSortedHist ¶
func NewSortedHist(values interface{}) (sh *SortedHist, ok bool)
func (*SortedHist) Frac ¶
func (s *SortedHist) Frac(factor float64)
func (*SortedHist) Freqs ¶
func (s *SortedHist) Freqs() []float64
func (*SortedHist) Keys ¶
func (s *SortedHist) Keys() (r []interface{})
func (*SortedHist) Len ¶
func (s *SortedHist) Len() int
func (*SortedHist) Less ¶
func (s *SortedHist) Less(i, j int) bool
func (*SortedHist) Scale ¶
func (s *SortedHist) Scale(factor float64)
func (*SortedHist) Swap ¶
func (s *SortedHist) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.