• 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
    • ExceptionCGEvidenceIncorporated
    • ExceptionCGLIMIDsNotSupported
    • ExceptionCaseStateTooLarge
    • ExceptionChainGraph
    • ExceptionCompressed
    • ExceptionComputationFailed
    • ExceptionCyclicFunctionalDependency
    • ExceptionCyclicInstanceHierarchy
    • ExceptionCyclicNetwork
    • ExceptionDemo
    • ExceptionDivisionByZero
    • ExceptionEnumeration
    • ExceptionError
    • ExceptionExpiredLicense
    • ExceptionFastRetraction
    • ExceptionFunctionalDependency
    • ExceptionHugin
    • ExceptionIO
    • ExceptionIllegalBinding
    • ExceptionInappropriateArguments
    • ExceptionInconsistencyOrUnderflow
    • ExceptionInsufficientStateRange
    • ExceptionInvalidEvidence
    • ExceptionInvalidExpression
    • ExceptionInvalidLicense
    • ExceptionInvalidName
    • ExceptionInvalidProbabilityPotential
    • ExceptionInvalidStateValues
    • ExceptionLocale
    • ExceptionLowDensity
    • ExceptionMemory
    • ExceptionNoEquilibrium
    • ExceptionNoValue
    • ExceptionNormalization
    • ExceptionNotCompiled
    • 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
    • ModExpression
    • Model
    • MultiplyExpression
    • NegateExpression
    • NegativeBinomialDistribution
    • NetworkModel
    • NetworkModel.Constraint
    • Node
    • Node.Category
    • Node.Kind
    • NodeExpression
    • NodeList
    • NoisyOrDistribution
    • NormalDistribution
    • NotEqualsExpression
    • NotExpression
    • NumberExpression
    • NumberedDCNode
    • NumberedDDNode
    • NumberedDFNode
    • NumericDiscreteNode
    • OrExpression
    • PERTDistribution
    • ParseListener
    • PoissonDistribution
    • PowerExpression
    • ProbabilityExpression
    • QuantileExpression
    • SinExpression
    • SinhExpression
    • SqrtExpression
    • StateIndexExpression
    • SubtractExpression
    • Table
    • TanExpression
    • TanhExpression
    • TriangularDistribution
    • TruncateExpression
    • UniformDistribution
    • UtilityNode
    • VarianceExpression
    • WeibullDistribution

Class JunctionTree

Thic class represents the JunctionTrees in the compiled domain.

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
JunctionTree
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: HAPI
Assembly: hugincs-9.7-netstandard2.0-x64.dll
Syntax
public class JunctionTree

Methods

CgEvidenceIsPropagated()

Returns true if CG evidence has been propagated in this JunctionTree; otherwise, returns false.

Declaration
public bool CgEvidenceIsPropagated()
Returns
Type Description
bool
Exceptions
Type Condition
ExceptionHugin

EquilibriumIs(Equilibrium)

Tests the Equilibrium type.

Declaration
public bool EquilibriumIs(Domain.Equilibrium equilibrium)
Parameters
Type Name Description
Domain.Equilibrium equilibrium

The type of Equilibrium to test for.

Returns
Type Description
bool

Returns true if the equilibrium of this JunctionTree can be obtained through a propagation using equilibrium as the Equilibrium type; otherwise, returns false.

Exceptions
Type Condition
ExceptionHugin

EvidenceIsPropagated()

Tests if evidence has been propagated.

Declaration
public bool EvidenceIsPropagated()
Returns
Type Description
bool

Returns true if evidence has been propagated in this JunctionTree; otherwise, returns false.

Exceptions
Type Condition
ExceptionHugin

EvidenceModeIs(EvidenceMode)

Tests the evidence mode.

Declaration
public bool EvidenceModeIs(Domain.EvidenceMode mode)
Parameters
Type Name Description
Domain.EvidenceMode mode
Returns
Type Description
bool

Returns true if the EvidenceMode matches mode; otherwise, returns false.

Exceptions
Type Condition
ExceptionHugin

EvidenceToPropagate()

Tests if this JunctionTree contains evidence that has not been propagated.

Declaration
public bool EvidenceToPropagate()
Returns
Type Description
bool

Returns true if the JunctionTree contains evidence that has not been propagated; otherwise, returns false.

Exceptions
Type Condition
ExceptionHugin

GetCliques()

Returns the cliques of this JunctionTree.

Declaration
public CliqueList GetCliques()
Returns
Type Description
CliqueList
Exceptions
Type Condition
ExceptionHugin

GetConflict()

Returns the conflict measure of the data inserted in this JunctionTree.

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

GetRoot()

Returns the root clique of this JunctionTree.

Declaration
public Clique GetRoot()
Returns
Type Description
Clique
Exceptions
Type Condition
ExceptionHugin

GetTotalCGSize()

Returns the total number of CG table entries for this JunctionTree.

Declaration
public ulong GetTotalCGSize()
Returns
Type Description
ulong
Remarks

Both clique and separator table entries are counted.

Generic declaration: public size_t GetTotalCGSize ()

Exceptions
Type Condition
ExceptionHugin

GetTotalSize()

Returns the total number of discrete table configurations for this JunctionTree.

Declaration
public ulong GetTotalSize()
Returns
Type Description
ulong
Remarks

Both clique and separator table configurations are counted. Also, if the junction tree has utility potentials, then the clique and separator configurations will effectively be counted twice.

Generic declaration: public size_t GetTotalSize ()

Exceptions
Type Condition
ExceptionHugin

IsAlive()

Is this JunctionTree object alive?

Declaration
public bool IsAlive()
Returns
Type Description
bool

LikelihoodIsPropagated()

Tests if likelihoods have been propagated.

Declaration
public bool LikelihoodIsPropagated()
Returns
Type Description
bool

Returns true if likelihoods have been propagated in this JunctionTree; otherwise, returns false.

Exceptions
Type Condition
ExceptionHugin

Propagate(Equilibrium, EvidenceMode)

Propagates evidence in this JunctionTree.

Declaration
public void Propagate(Domain.Equilibrium equilibrium, Domain.EvidenceMode evidenceMode)
Parameters
Type Name Description
Domain.Equilibrium equilibrium

The type of Equilibrium reached after the propagation.

Domain.EvidenceMode evidenceMode

The EvidenceMode used.

Exceptions
Type Condition
ExceptionHugin

TablesToPropagate()

Tests if this JunctionTree contains tables that have not been propagated.

Declaration
public bool TablesToPropagate()
Returns
Type Description
bool

Returns true if this JunctionTree contains updated tables that have not been propagated; otherwise, returns false.

Exceptions
Type Condition
ExceptionHugin
In this article
Back to top Copyright (C) 2019-2025 Hugin Expert A/S