@@ -23,8 +23,9 @@ mutable struct VariableNodeData{T<:InferenceVariable}
23
23
dontmargin:: Bool
24
24
solveInProgress:: Int
25
25
solvedCount:: Int
26
+ event:: Condition # This object is NOT thread-safe. See Threads.Condition for a thread-safe version.
26
27
VariableNodeData {T} () where {T <: InferenceVariable } =
27
- new {T} (zeros (1 ,1 ), zeros (1 ,1 ), Symbol[], Int[], 0 , false , :NOTHING , Symbol[], T (), false , 0.0 , false , false , 0 , 0 )
28
+ new {T} (zeros (1 ,1 ), zeros (1 ,1 ), Symbol[], Int[], 0 , false , :NOTHING , Symbol[], T (), false , 0.0 , false , false , 0 , 0 , Condition () )
28
29
VariableNodeData {T} (val:: Array{Float64,2} ,
29
30
bw:: Array{Float64,2} ,
30
31
BayesNetOutVertIDs:: Array{Symbol,1} ,
@@ -38,11 +39,12 @@ mutable struct VariableNodeData{T<:InferenceVariable}
38
39
ismargin:: Bool ,
39
40
dontmargin:: Bool ,
40
41
solveInProgress:: Int = 0 ,
41
- solvedCount:: Int = 0 ) where T <: InferenceVariable =
42
+ solvedCount:: Int = 0 ,
43
+ eventCondition:: Condition = Condition ()) where T <: InferenceVariable =
42
44
new {T} (val,bw,BayesNetOutVertIDs,dimIDs,dims,
43
45
eliminated,BayesNetVertID,separator,
44
46
softtype:: T ,initialized,inferdim,ismargin,
45
- dontmargin, solveInProgress, solvedCount)
47
+ dontmargin, solveInProgress, solvedCount, eventCondition )
46
48
end
47
49
48
50
VariableNodeData (val:: Array{Float64,2} ,
0 commit comments