JunctionTree
public class JunctionTree
Thic class represents the junction trees of a compiled domain.
-
Is this JunctionTree object alive?
Declaration
Swift
public func isAlive() -> Bool
-
Returns the cliques of this JunctionTree.
Declaration
Swift
public func getCliques() throws -> [Clique]
-
Returns the root clique of this JunctionTree.
Declaration
Swift
public func getRoot() throws -> Clique
Return Value
A Clique.
-
Returns the total number of discrete table configurations for this JunctionTree. 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.
Declaration
Swift
public func getTotalSize() throws -> Int
-
Returns the total number of CG table entries for this JunctionTree. Both clique and separator table entries are counted.
Declaration
Swift
public func getTotalCGSize() throws -> Int
-
Returns the conflict measure of the data inserted in this JunctionTree.
Declaration
Swift
public func getConflict() throws -> Double
Return Value
A double.
-
Tests the Equilibrium type. Returns
true
if the equilibrium of this JunctionTree can be obtained through a propagation usingequilibrium
as the Equilibrium type; otherwise, returnsfalse
.Declaration
Swift
public func equilibriumIs(_ equilibrium: Domain.Equilibrium) throws -> Bool
Parameters
equilibrium
the type of Equilibrium to test for.
-
Returns
true
if the EvidenceMode matchesmode
; otherwise, returnsfalse
.Declaration
Swift
public func evidenceModeIs(_ mode: Domain.EvidenceMode) throws -> Bool
Parameters
mode
the type of EvidenceMode to test for.
-
Returns
true
if evidence has been propagated in this JunctionTree; otherwise, returnsfalse
.Declaration
Swift
public func evidenceIsPropagated() throws -> Bool
-
Returns
true
if likelihoods have been propagated in this JunctionTree; otherwise, returnsfalse
.Declaration
Swift
public func likelihoodIsPropagated() throws -> Bool
-
Returns
true
if CG evidence has been propagated in this JunctionTree; otherwise, returnsfalse
.Declaration
Swift
public func cgEvidenceIsPropagated() throws -> Bool
-
Returns
true
if the JunctionTree contains evidence that has not been propagated; otherwise, returnsfalse
.Declaration
Swift
public func evidenceToPropagate() throws -> Bool
-
Returns
true
if this JunctionTree contains updated tables that have not been propagated; otherwise, returnsfalse
.Declaration
Swift
public func tablesToPropagate() throws -> Bool