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
  • Propagates evidence in this JunctionTree.

    Declaration

    Swift

    public func propagate (equilibrium: Domain.Equilibrium = .sum,
    mode: Domain.EvidenceMode = .normal) throws

    Parameters

    equilibrium

    the type of Equilibrium reached after the propagation.

    mode

    the EvidenceMode used.

  • 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 using equilibrium as the Equilibrium type; otherwise, returns false.

    Declaration

    Swift

    public func equilibriumIs(_ equilibrium: Domain.Equilibrium) throws -> Bool

    Parameters

    equilibrium

    the type of Equilibrium to test for.

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

    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, returns false.

    Declaration

    Swift

    public func evidenceIsPropagated() throws -> Bool
  • Returns true if likelihoods have been propagated in this JunctionTree; otherwise, returns false.

    Declaration

    Swift

    public func likelihoodIsPropagated() throws -> Bool
  • Returns true if CG evidence has been propagated in this JunctionTree; otherwise, returns false.

    Declaration

    Swift

    public func cgEvidenceIsPropagated() throws -> Bool
  • Returns true if the JunctionTree contains evidence that has not been propagated; otherwise, returns false.

    Declaration

    Swift

    public func evidenceToPropagate() throws -> Bool
  • Returns true if this JunctionTree contains updated tables that have not been propagated; otherwise, returns false.

    Declaration

    Swift

    public func tablesToPropagate() throws -> Bool