Versions in this module Expand all Collapse all v0 v0.1.0 Dec 14, 2018 Changes in this version + const GaussMax + func BreadthFirst(G SPN, f func(SPN) bool) + func Complete(S SPN) bool + func ComputeHeight(S SPN) int + func ComputeScope(S SPN) []int + func CountNodes(G SPN) (int, int, int) + func Decomposable(S SPN) bool + func DepthFirst(G SPN, f func(SPN) bool) + func Inference(S SPN, I VarSet) float64 + func InferenceY(S SPN, I VarSet, Y, y int) float64 + func Marshal(S SPN) []byte + func PostOrder(G SPN, C common.Collection) common.Collection + func PrintSPN(S SPN, filename string) + func RegisterGobType(t interface{}) + func StoreMAP(S SPN, I VarSet, tk int, storage *Storer) (SPN, int, VarSet) + func TopSortDFS(G SPN, C common.Collection) common.Collection + func TopSortTarjan(G SPN, C common.Collection) common.Collection + func TopSortTarjanFunc(G SPN, C common.Collection, f func(SPN) bool) common.Collection + func TopSortTarjanRec(G SPN, C common.Collection) common.Collection + func TraceMAP(S SPN, I VarSet) map[SPN]int + type Dataset []map[int]int + type Gaussian struct + func NewGaussian(varid int, counts []int) *Gaussian + func NewGaussianFit(varid int, counts []float64) *Gaussian + func NewGaussianMode(varid int, counts []int) *Gaussian + func NewGaussianParams(varid int, mu float64, sigma float64) *Gaussian + func NewGaussianRaw(varid int, vals []float64) *Gaussian + func (g *Gaussian) ArgMax(val VarSet) (VarSet, float64) + func (g *Gaussian) GobDecode(data []byte) error + func (g *Gaussian) GobEncode() ([]byte, error) + func (g *Gaussian) Max(val VarSet) float64 + func (g *Gaussian) Params() (float64, float64) + func (g *Gaussian) Sc() []int + func (g *Gaussian) SubType() string + func (g *Gaussian) Type() string + func (g *Gaussian) Value(val VarSet) float64 + type Indicator struct + func NewIndicator(varid int, v int) *Indicator + func (i *Indicator) ArgMax(val VarSet) (VarSet, float64) + func (i *Indicator) GobDecode(data []byte) error + func (i *Indicator) GobEncode() ([]byte, error) + func (i *Indicator) Max(val VarSet) float64 + func (i *Indicator) Sc() []int + func (i *Indicator) Type() string + func (i *Indicator) Value(val VarSet) float64 + type Mode struct + type Multinomial struct + func NewCountingMultinomial(varid int, counts []int) *Multinomial + func NewEmptyMultinomial(varid, m int) *Multinomial + func NewMultinomial(varid int, dist []float64) *Multinomial + func NewScopedCountingMultinomial(varid int, esc []int, counts []int) *Multinomial + func (m *Multinomial) ArgMax(val VarSet) (VarSet, float64) + func (m *Multinomial) GobDecode(data []byte) error + func (m *Multinomial) GobEncode() ([]byte, error) + func (m *Multinomial) Max(val VarSet) float64 + func (m *Multinomial) Mean() float64 + func (m *Multinomial) MuSigma() (float64, float64) + func (m *Multinomial) Pr() []float64 + func (m *Multinomial) StdDev() float64 + func (m *Multinomial) SubType() string + func (m *Multinomial) Type() string + func (m *Multinomial) Value(val VarSet) float64 + type Node struct + func (n *Node) AddChild(c SPN) + func (n *Node) ArgMax(val VarSet) (VarSet, float64) + func (n *Node) Ch() []SPN + func (n *Node) Compute(cv []float64) float64 + func (n *Node) Height() int + func (n *Node) Max(val VarSet) float64 + func (n *Node) Parameters() *parameters.P + func (n *Node) Sc() []int + func (n *Node) SubType() string + func (n *Node) Type() string + func (n *Node) Value(val VarSet) float64 + type Product struct + func NewProduct() *Product + func (p *Product) AddChild(c SPN) + func (p *Product) ArgMax(val VarSet) (VarSet, float64) + func (p *Product) Compute(cv []float64) float64 + func (p *Product) GobDecode(data []byte) error + func (p *Product) GobEncode() ([]byte, error) + func (p *Product) Max(val VarSet) float64 + func (p *Product) Parameters() *parameters.P + func (p *Product) Sc() []int + func (p *Product) Type() string + func (p *Product) Value(val VarSet) float64 + type SPN interface + AddChild func(c SPN) + ArgMax func(val VarSet) (VarSet, float64) + Ch func() []SPN + Compute func(cv []float64) float64 + Height func() int + Max func(val VarSet) float64 + Parameters func() *parameters.P + Sc func() []int + SubType func() string + Type func() string + Value func(val VarSet) float64 + func NormalizeSPN(S SPN) SPN + func StoreInference(S SPN, I VarSet, tk int, storage *Storer) (SPN, int) + func Unmarshal(buffer []byte) SPN + type Storer struct + func NewStorer() *Storer + func (s *Storer) Delete(k int) + func (s *Storer) Entry(k int, S SPN, l int) (float64, bool) + func (s *Storer) Exists(k int, S SPN, i int) bool + func (s *Storer) ExistsSPN(k int, S SPN) bool + func (s *Storer) NewTicket() int + func (s *Storer) Purge() + func (s *Storer) Reset(k int) int + func (s *Storer) ResetTickets(K ...int) + func (s *Storer) Single(k int, S SPN) (float64, bool) + func (s *Storer) Store(k int, S SPN, l int, e float64) bool + func (s *Storer) StoreSingle(k int, S SPN, v float64) bool + func (s *Storer) Table(k int) (StorerTable, bool) + func (s *Storer) Value(k int, S SPN) (map[int]float64, bool) + type StorerTable map[SPN]map[int]float64 + func (s StorerTable) Entry(S SPN, l int) (float64, bool) + func (t StorerTable) Exists(S SPN, i int) bool + func (t StorerTable) ExistsSPN(S SPN) bool + func (t StorerTable) Single(S SPN) (float64, bool) + func (t StorerTable) Store(S SPN, l int, e float64) bool + func (t StorerTable) StoreSingle(S SPN, v float64) bool + func (t StorerTable) Value(S SPN) (map[int]float64, bool) + type Sum struct + func NewSum() *Sum + func (s *Sum) AddChild(c SPN) + func (s *Sum) AddChildW(c SPN, w float64) + func (s *Sum) AddWeight(w float64) + func (s *Sum) ArgMax(val VarSet) (VarSet, float64) + func (s *Sum) Compute(cv []float64) float64 + func (s *Sum) ComputeHard(cv []float64, scount float64) float64 + func (s *Sum) GobDecode(data []byte) error + func (s *Sum) GobEncode() ([]byte, error) + func (s *Sum) Max(val VarSet) float64 + func (s *Sum) Parameters() *parameters.P + func (s *Sum) Sc() []int + func (s *Sum) Type() string + func (s *Sum) Value(val VarSet) float64 + func (s *Sum) Weights() []float64 + type VarSet map[int]int