Skip to content

Commit

Permalink
fix BIFM helper
Browse files Browse the repository at this point in the history
  • Loading branch information
bvdmitri committed Apr 4, 2024
1 parent 4017a99 commit 3753342
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/nodes/predefined/bifm_helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ struct BIFMHelper <: AbstractFactorNode end
@node BIFMHelper Stochastic [out, in]

# specify custom functional dependencies for BIFMHelper node
function functional_dependencies(dependencies, factornode::FactorNode{<:Type{BIFMHelper}}, iindex::Int)
cindex = clusterindex(factornode, iindex)
function functional_dependencies(::DefaultFunctionalDependencies, factornode::FactorNode{<:Type{BIFMHelper}}, interface, iindex)

clusters = getlocalclusters(factornode)
cindex = clusterindex(clusters, iindex)

nodeinterfaces = interfaces(factornode)
nodeclusters = factorisation(factornode)
nodelocalmarginals = localmarginals(factornode)

varcluster = @inbounds nodeclusters[cindex]
nodeinterfaces = getinterfaces(factornode)
nodelocalmarginals = getmarginals(clusters)

# output
if iindex === 2
Expand Down

0 comments on commit 3753342

Please sign in to comment.