• Manual
  • HAPI Namespace
Show / Hide Table of Contents
  • HAPI
    • AbsExpression
    • AddExpression
    • AggregateExpression
    • AndExpression
    • Attribute
    • BetaDistribution
    • BinomialDistribution
    • BooleanDCNode
    • BooleanDDNode
    • BooleanDFNode
    • BooleanExpression
    • CeilExpression
    • Class
    • ClassCollection
    • ClassList
    • ClassParseListener
    • Clique
    • CliqueList
    • CompositeExpression
    • ConstantExpression
    • ContinuousChanceNode
    • CosExpression
    • CoshExpression
    • DataSet
    • DefaultClassParseListener
    • DiscreteChanceNode
    • DiscreteDecisionNode
    • DiscreteFunctionNode
    • DiscreteNode
    • DistributionDistribution
    • DivideExpression
    • Domain
    • Domain.Equilibrium
    • Domain.EvidenceMode
    • Domain.TriangulationMethod
    • EqualsExpression
    • ExceptionArgumentNotAlive
    • ExceptionBadKBFormat
    • ExceptionBadKBPassword
    • ExceptionBadKBVersion
    • ExceptionCaseStateTooLarge
    • ExceptionCGEvidenceIncorporated
    • ExceptionCGLIMIDsNotSupported
    • ExceptionChainGraph
    • ExceptionCompressed
    • ExceptionComputationFailed
    • ExceptionCyclicFunctionalDependency
    • ExceptionCyclicInstanceHierarchy
    • ExceptionCyclicNetwork
    • ExceptionDemo
    • ExceptionDivisionByZero
    • ExceptionEnumeration
    • ExceptionError
    • ExceptionExpiredLicense
    • ExceptionFastRetraction
    • ExceptionFunctionalDependency
    • ExceptionHugin
    • ExceptionIllegalBinding
    • ExceptionInappropriateArguments
    • ExceptionInconsistencyOrUnderflow
    • ExceptionInsufficientStateRange
    • ExceptionInvalidEvidence
    • ExceptionInvalidExpression
    • ExceptionInvalidLicense
    • ExceptionInvalidName
    • ExceptionInvalidProbabilityPotential
    • ExceptionInvalidStateValues
    • ExceptionIO
    • ExceptionLocale
    • ExceptionLowDensity
    • ExceptionMemory
    • ExceptionNoEquilibrium
    • ExceptionNormalization
    • ExceptionNotCompiled
    • ExceptionNoValue
    • ExceptionObjectNotAlive
    • ExceptionOverflow
    • ExceptionParse
    • ExceptionRounding
    • ExceptionSizeTooLarge
    • ExceptionSyntax
    • ExceptionTableTooLarge
    • ExceptionTwice
    • ExceptionUsage
    • ExceptionZeroVariance
    • ExpExpression
    • ExponentialDistribution
    • Expression
    • Expression.Operator
    • ExpressionList
    • FloorExpression
    • FunctionNode
    • GammaDistribution
    • GeometricDistribution
    • GreaterThanExpression
    • GreaterThanOrEqualsExpression
    • IfExpression
    • InstanceNode
    • IntervalDCNode
    • IntervalDDNode
    • IntervalDFNode
    • JunctionTree
    • JunctionTreeList
    • LabelExpression
    • LabelledDCNode
    • LabelledDDNode
    • LabelledDFNode
    • LessThanExpression
    • LessThanOrEqualsExpression
    • Log10Expression
    • Log2Expression
    • LogExpression
    • LogNormalDistribution
    • MaxExpression
    • MinExpression
    • Model
    • ModExpression
    • MultiplyExpression
    • NegateExpression
    • NegativeBinomialDistribution
    • NetworkModel
    • NetworkModel.Constraint
    • Node
    • Node.Category
    • Node.Kind
    • NodeExpression
    • NodeList
    • NoisyOrDistribution
    • NormalDistribution
    • NotEqualsExpression
    • NotExpression
    • NumberedDCNode
    • NumberedDDNode
    • NumberedDFNode
    • NumberExpression
    • NumericDiscreteNode
    • OrExpression
    • ParseListener
    • PERTDistribution
    • PoissonDistribution
    • PowerExpression
    • ProbabilityExpression
    • SinExpression
    • SinhExpression
    • SqrtExpression
    • StateIndexExpression
    • SubtractExpression
    • Table
    • TanExpression
    • TanhExpression
    • TriangularDistribution
    • TruncateExpression
    • UniformDistribution
    • UtilityNode
    • VarianceExpression
    • WeibullDistribution

Class ContinuousChanceNode

Represents continuous chance nodes with (conditional) Gaussian distributions.

Note: Return and argument types for methods in this class vary depending on the particular API DLL (x86/x64 platform, single/double precision) being used. Please read the section Using the Hugin C#/.NET Core/.NET 5/.NET 6 API.

Inheritance
object
Node
ContinuousChanceNode
Implements
ICloneable
Inherited Members
Node.IsAlive()
Node.Delete()
Node.SetName(string)
Node.GetName()
Node.AddParent(Node)
Node.AddToInputs()
Node.AddToOutputs()
Node.Clone()
Node.EvidenceIsEntered()
Node.EvidenceIsPropagated()
Node.EvidenceToPropagate()
Node.GetAttribute(string)
Node.GetAttributes()
Node.GetChildren()
Node.GetEdgeConstraint(Node)
Node.GetHome()
Node.GetHomeClass()
Node.GetHomeDomain()
Node.GetInstance()
Node.GetJunctionTree()
Node.GetLabel()
Node.GetMaster()
Node.GetParents()
Node.GetPosition()
Node.SetPosition(Point)
Node.GetUserData()
Node.SetUserData(object)
Node.GetSource()
Node.LikelihoodIsEntered()
Node.LikelihoodIsPropagated()
Node.RemoveFromInputs()
Node.RemoveFromOutputs()
Node.RemoveParent(Node)
Node.ReverseEdge(Node)
Node.SetAttribute(string, string)
Node.SetAttributes(List<Attribute>)
Node.SetEdgeConstraint(Node, NetworkModel.Constraint)
Node.SetLabel(string)
Node.SwitchParent(Node, Node)
Node.GetModel()
Node.GetTable()
Node.CreateTemporalClone()
Node.GetTemporalClone()
Node.GetTemporalMaster()
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: HAPI
Assembly: hugincs-9.4-netstandard2.0-x64.dll
Syntax
public class ContinuousChanceNode : Node, ICloneable
Remarks

Continuous chance nodes are also sometimes called CG nodes (CG for conditional Gaussian).

Constructors

ContinuousChanceNode(NetworkModel)

Constructs a new continuous chance node.

Declaration
public ContinuousChanceNode(NetworkModel belongsTo)
Parameters
Type Name Description
NetworkModel belongsTo

The NetworkModel (i.e., Class or Domain) to which the new node should belong.

Exceptions
Type Condition
ExceptionHugin

Methods

CaseIsSet(ulong)

Tests if a value has been set for this ContinuousChanceNode in a specific case.

Declaration
public bool CaseIsSet(ulong c)
Parameters
Type Name Description
ulong c

The case index represented.

Returns
Type Description
bool

Returns true if a value has been set for this ContinuousChanceNode in case c; otherwise, returns false.

Remarks

Generic declaration: public bool CaseIsSet (size_t c)

Exceptions
Type Condition
ExceptionHugin

EnterValue(double)

Enters evidence (observation of the value) for this ContinuousChanceNode.

Declaration
public void EnterValue(double value)
Parameters
Type Name Description
double value

A real number representing the observation.

Exceptions
Type Condition
ExceptionHugin

GetAlpha(ulong)

Returns the alpha component of the CG distribution of this ContinuousChanceNode given the discrete parent configuration corresponding to i.

Declaration
public double GetAlpha(ulong i)
Parameters
Type Name Description
ulong i

The index of a discrete parent configuration.

Returns
Type Description
double

The alpha component.

Remarks

Generic declaration: public double GetAlpha (size_t i)

Exceptions
Type Condition
ExceptionHugin

GetBeta(ContinuousChanceNode, ulong)

Returns the beta component of the CG distribution of this ContinuousChanceNode given a continuous parent and the discrete parent configuration corresponding to i.

Declaration
public double GetBeta(ContinuousChanceNode parent, ulong i)
Parameters
Type Name Description
ContinuousChanceNode parent

A ContinuousChanceNode parent of this ContinuousChanceNode.

ulong i

The index of a discrete parent configuration.

Returns
Type Description
double

The beta component.

Remarks

Generic declaration: public double GetBeta (ContinuousChanceNode parent, size_t i)

Exceptions
Type Condition
ExceptionHugin

GetCaseValue(ulong)

Returns the value set for this ContinuousChanceNode in case c.

Declaration
public double GetCaseValue(ulong c)
Parameters
Type Name Description
ulong c

The case index.

Returns
Type Description
double
Remarks

Generic declaration: public double GetCaseValue (size_t c)

Exceptions
Type Condition
ExceptionHugin

GetCategory()

Returns the Category of this Node.

Declaration
public override Node.Category GetCategory()
Returns
Type Description
Node.Category

H_CATEGORY_CHANCE

Overrides
Node.GetCategory()

GetDistribution()

Returns the distribution for this continuous node.

Declaration
public Table GetDistribution()
Returns
Type Description
Table

A Table holding a strong marginal of this node and a set of discrete nodes.

Remarks

The distribution for a continuous chance node is in general a mixture of several Gaussian distributions. This method actually computes a joint distribution of this CG node and a set of discrete nodes. These discrete nodes are chosen such that the computed marginal is a strong marginal, but it is not necessarily minimal.

Exceptions
Type Condition
ExceptionHugin

GetEnteredValue()

Returns the evidence (value) entered for this ContinuousChanceNode.

Declaration
public double GetEnteredValue()
Returns
Type Description
double

A real number (double precision) expressing the value entered.

Remarks

If no value has been entered, an ExceptionHugin is thrown.

Exceptions
Type Condition
ExceptionHugin

GetExperienceTable()

Returns the experience table of this ContinousChanceNode.

Declaration
public Table GetExperienceTable()
Returns
Type Description
Table
Exceptions
Type Condition
ExceptionHugin

GetGamma(ulong)

Returns the gamma component of the CG distribution of this ContinuousChanceNode given the discrete parent configuration corresponding to i.

Declaration
public double GetGamma(ulong i)
Parameters
Type Name Description
ulong i

The index of a discrete parent configuration.

Returns
Type Description
double

The gamma component.

Remarks

Generic declaration: public double GetGamma (size_t i)

Exceptions
Type Condition
ExceptionHugin

GetKind()

Returns the Kind of this Node.

Declaration
public override Node.Kind GetKind()
Returns
Type Description
Node.Kind

H_KIND_CONTINUOUS

Overrides
Node.GetKind()

GetMean()

Returns the mean of the marginal distribution of this ContinuousChanceNode.

Declaration
public double GetMean()
Returns
Type Description
double

A real number (double precision) expressing the mean.

Exceptions
Type Condition
ExceptionHugin

GetPredictedMean(ulong)

Returns the predicted mean of the marginal distribution of this ContinuousChanceNode at the specified time point.

Declaration
public double GetPredictedMean(ulong time)
Parameters
Type Name Description
ulong time

The time slice index (a nonnegative integer less than the number of predicted time slices).

Returns
Type Description
double
Remarks

This method accesses the predictions computed by a previous call to ComputeDBNPredictions(ulong).

Exceptions
Type Condition
ExceptionHugin

GetPredictedVariance(ulong)

Returns the predicted variance of the marginal distribution of this ContinuousChanceNode at the specified time point.

Declaration
public double GetPredictedVariance(ulong time)
Parameters
Type Name Description
ulong time

The time slice index (a nonnegative integer less than the number of predicted time slices).

Returns
Type Description
double
Remarks

This method accesses the predictions computed by a previous call to ComputeDBNPredictions(ulong).

Generic declaration: public double GetPredictedVariance (size_t time)

Exceptions
Type Condition
ExceptionHugin

GetPropagatedValue()

Retrieves the value that has been propagated for this ContinuousChanceNode.

Declaration
public double GetPropagatedValue()
Returns
Type Description
double

A real number (double precision) expressing the propagated value.

Remarks

Retrieves the value that has been propagated for this ContinuousChanceNode. That is, the value incorporated in the current JunctionTree potentials as the state of this node.

Exceptions
Type Condition
ExceptionHugin

GetSampledValue()

Returns the value of this ContinuousChanceNode for the configuration generated by the most recent call to Simulate().

Declaration
public double GetSampledValue()
Returns
Type Description
double

The value sampled for this during the last invocation of Simulate() on the domain of this node.

Exceptions
Type Condition
ExceptionHugin

GetVariance()

Returns the variance of the marginal distribution of this ContinuousChanceNode.

Declaration
public double GetVariance()
Returns
Type Description
double
Exceptions
Type Condition
ExceptionHugin

HasExperienceTable()

Tests if this ContinousChanceNode has an experience table.

Declaration
public bool HasExperienceTable()
Returns
Type Description
bool

Returns true if this ContinousChanceNode has an experience table; returns false otherwise.

Exceptions
Type Condition
ExceptionHugin

RetractFindings()

Retracts the evidence (value) entered for this ContinuousChanceNode.

Declaration
public void RetractFindings()
Exceptions
Type Condition
ExceptionHugin

SetAlpha(double, ulong)

Sets the alpha component of the CG distribution of this ContinuousChanceNode given the discrete parent configuration corresponding to i.

Declaration
public void SetAlpha(double alpha, ulong i)
Parameters
Type Name Description
double alpha

The value of the alpha component.

ulong i

The index of a discrete parent configuration.

Remarks

Generic declaration: public void SetAlpha (double alpha, size_t i)

Exceptions
Type Condition
ExceptionHugin

SetBeta(double, ContinuousChanceNode, ulong)

Sets the beta component of the CG distribution of this ContinuousChanceNode given a continuous parent and the discrete parent configuration corresponding to i.

Declaration
public void SetBeta(double beta, ContinuousChanceNode parent, ulong i)
Parameters
Type Name Description
double beta

The value of the beta component.

ContinuousChanceNode parent

A ContinuousChanceNode parent of this ContinuousChanceNode.

ulong i

The index of a discrete parent configuration.

Remarks

Generic declaration: public void SetBeta (double beta, ContinuousChanceNode parent, size_t i)

Exceptions
Type Condition
ExceptionHugin

SetCaseValue(ulong, double)

Sets the value of this ContinuousChanceNode to value in case c.

Declaration
public void SetCaseValue(ulong c, double value)
Parameters
Type Name Description
ulong c

The case index represented as an integer.

double value

The value represented as a real number.

Remarks

Generic declaration: public void SetCaseValue (size_t c, double value)

Exceptions
Type Condition
ExceptionHugin

SetGamma(double, ulong)

Sets the gamma component of the CG distribution of this ContinuousChanceNode given the discrete parent configuration corresponding to i.

Declaration
public void SetGamma(double gamma, ulong i)
Parameters
Type Name Description
double gamma

The value of the gamma component.

ulong i

The index of a discrete parent configuration.

Remarks

Generic declaration: public void SetGamma (double gamma, size_t i)

Exceptions
Type Condition
ExceptionHugin

UnsetCase(ulong)

Specifies that the value of this ContinuousChanceNode is 'unknown' for case c.

Declaration
public void UnsetCase(ulong c)
Parameters
Type Name Description
ulong c

The case index.

Remarks

Generic declaration: public void UnsetCase (size_t c)

Exceptions
Type Condition
ExceptionHugin

Implements

ICloneable
In This Article
Back to top Copyright (C) 2019-2023 Hugin Expert A/S