Skip to content

Commit 6bb0fc6

Browse files
committed
Merge branch 'hotfix/149_DFGVariableSoftype' of https://github.com/JuliaRobotics/DistributedFactorGraphs.jl.git into jt/develop
2 parents 8b83617 + 0093ae2 commit 6bb0fc6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/entities/DFGVariable.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
#TODO don't know what to do if it is uninitalized
2+
#so for now defining a Singleton for the default
3+
struct SingletonInferenceVariable <: InferenceVariable end
4+
15
"""
26
$(TYPEDEF)
37
"""
4-
mutable struct VariableNodeData{T<:Any}
8+
mutable struct VariableNodeData #TODO v0.5.0 {T<:InferenceVariable}
59
val::Array{Float64,2}
610
bw::Array{Float64,2}
711
BayesNetOutVertIDs::Array{Symbol,1}
@@ -10,7 +14,7 @@ mutable struct VariableNodeData{T<:Any}
1014
eliminated::Bool
1115
BayesNetVertID::Symbol # Union{Nothing, }
1216
separator::Array{Symbol,1}
13-
softtype::T # Perhaps this should move up to DFGVariable level
17+
softtype::InferenceVariable #TODO v0.5.0 T
1418
initialized::Bool
1519
inferdim::Float64
1620
ismargin::Bool
@@ -20,7 +24,7 @@ mutable struct VariableNodeData{T<:Any}
2024
# A valid, packable default constructor is needed.
2125

2226
end
23-
VariableNodeData() = VariableNodeData(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], "", false, 0.0, false, false)
27+
VariableNodeData() = VariableNodeData(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], SingletonInferenceVariable(), false, 0.0, false, false)
2428

2529
"""
2630
$(TYPEDEF)

0 commit comments

Comments
 (0)