variable

package
v0.0.0-...-d568a9c Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContinuousRV

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

A continuous random variable

func NewContinuousRV

func NewContinuousRV(val float64, space dist.RealSpace) *ContinuousRV

Create a new continuous random variable

func (ContinuousRV) Equals

func (rv ContinuousRV) Equals(other RandomVariable) bool

func (*ContinuousRV) Set

func (rv *ContinuousRV) Set(val float64)

func (ContinuousRV) Space

func (rv ContinuousRV) Space() dist.RealSpace

func (ContinuousRV) Val

func (rv ContinuousRV) Val() float64

type DiscreteRV

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

A discrete random variable

func NewDiscreteRV

func NewDiscreteRV(val dist.Outcome, space dist.DiscreteRealSpace) *DiscreteRV

Create a new discrete random variable

func (DiscreteRV) Equals

func (rv DiscreteRV) Equals(other RandomVariable) bool

func (DiscreteRV) Outcome

func (rv DiscreteRV) Outcome() dist.Outcome

func (*DiscreteRV) Set

func (rv *DiscreteRV) Set(val float64)

func (*DiscreteRV) SetOutcome

func (rv *DiscreteRV) SetOutcome(val dist.Outcome)

func (DiscreteRV) Space

func (rv DiscreteRV) Space() dist.DiscreteRealSpace

func (DiscreteRV) Val

func (rv DiscreteRV) Val() float64

type RandomVariable

type RandomVariable interface {

	// Get the variable's current value
	Val() float64

	// Set the variable's current value
	Set(val float64)

	// Ask whether the variable has the same domain and value as another variable
	Equals(other RandomVariable) bool
}

A random variable in a factor graph

Jump to

Keyboard shortcuts

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