Skip to content

Commit 6a7c1bd

Browse files
authored
Merge pull request #255 from JuliaRobotics/maint/1Q20/fixcomplbreaks
fix fatal compilation errors
2 parents 1cc1f2d + 62ce777 commit 6a7c1bd

File tree

1 file changed

+38
-21
lines changed

1 file changed

+38
-21
lines changed

src/entities/DFGVariable.jl

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,47 @@ mutable struct VariableNodeData{T<:InferenceVariable}
2222
ismargin::Bool
2323
dontmargin::Bool
2424
solveInProgress::Int
25-
# Tonio surprise TODO
26-
# frontalonly::Bool
25+
VariableNodeData{T}() where {T <:InferenceVariable} =
26+
new{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], T(), false, 0.0, false, false, 0)
27+
VariableNodeData{T}(val::Array{Float64,2},
28+
bw::Array{Float64,2},
29+
BayesNetOutVertIDs::Array{Symbol,1},
30+
dimIDs::Array{Int,1},
31+
dims::Int,eliminated::Bool,
32+
BayesNetVertID::Symbol,
33+
separator::Array{Symbol,1},
34+
softtype::T,
35+
initialized::Bool,
36+
inferdim::Float64,
37+
ismargin::Bool,
38+
dontmargin::Bool,
39+
solveInProgress::Int=0) where T <: InferenceVariable =
40+
new{T}(val,bw,BayesNetOutVertIDs,dimIDs,dims,
41+
eliminated,BayesNetVertID,separator,
42+
softtype::T,initialized,inferdim,ismargin,
43+
dontmargin, solveInProgress)
2744
end
2845

2946
VariableNodeData(val::Array{Float64,2},
30-
bw::Array{Float64,2},
31-
BayesNetOutVertIDs::Array{Symbol,1},
32-
dimIDs::Array{Int,1},
33-
dims::Int,eliminated::Bool,
34-
BayesNetVertID::Symbol,
35-
separator::Array{Symbol,1},
36-
softtype::T,
37-
initialized::Bool,
38-
inferdim::Float64,
39-
ismargin::Bool,
40-
dontmargin::Bool,
41-
solveInProgress::Int=0) where T <: InferenceVariable =
42-
VariableNodeData{T}(val,bw,BayesNetOutVertIDs,dimIDs,dims,eliminated,BayesNetVertID,separator,
43-
softtype::T,initialized,inferdim,ismargin,dontmargin, solveInProgress)
44-
47+
bw::Array{Float64,2},
48+
BayesNetOutVertIDs::Array{Symbol,1},
49+
dimIDs::Array{Int,1},
50+
dims::Int,eliminated::Bool,
51+
BayesNetVertID::Symbol,
52+
separator::Array{Symbol,1},
53+
softtype::T,
54+
initialized::Bool,
55+
inferdim::Float64,
56+
ismargin::Bool,
57+
dontmargin::Bool,
58+
solveInProgress::Int=0) where T <: InferenceVariable =
59+
VariableNodeData{T}(val,bw,BayesNetOutVertIDs,dimIDs,dims,
60+
eliminated,BayesNetVertID,separator,
61+
softtype::T,initialized,inferdim,ismargin,
62+
dontmargin, solveInProgress)
63+
#
64+
VariableNodeData(softtype::T) where T <: InferenceVariable =
65+
VariableNodeData{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], softtype, false, 0.0, false, false, 0)
4566

4667
function VariableNodeData()
4768
st = stacktrace()
@@ -50,11 +71,7 @@ function VariableNodeData()
5071
VariableNodeData{InferenceVariable}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], SingletonInferenceVariable(), false, 0.0, false, false, 0)
5172
end
5273

53-
VariableNodeData{T}() where {T <:InferenceVariable} =
54-
VariableNodeData{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], T(), false, 0.0, false, false, 0)
5574

56-
VariableNodeData(softtype::T) where T <: InferenceVariable =
57-
VariableNodeData{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], softtype, false, 0.0, false, false, 0)
5875

5976
"""
6077
$(TYPEDEF)

0 commit comments

Comments
 (0)