Skip to content

Commit 575e146

Browse files
authored
Merge pull request #63 from JuliaRobotics/feature/3Q19/fulldim
partialinit bool becomes inferdim float
2 parents 18d962e + ecb4fff commit 575e146

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/entities/DFGVariable.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mutable struct VariableNodeData
1212
separator::Array{Symbol,1}
1313
softtype
1414
initialized::Bool
15-
partialinit::Bool
15+
inferdim::Float64
1616
ismargin::Bool
1717
dontmargin::Bool
1818
# A valid, packable default constructor is needed.
@@ -28,7 +28,7 @@ mutable struct VariableNodeData
2828
# x9::Dict{ Tuple{Symbol, Vector{Float64}} }, # Union{Nothing, },
2929
x10,
3030
x11::Bool,
31-
x12::Bool,
31+
x12::Float64,
3232
x13::Bool,
3333
x14::Bool) =
3434
new(x1,x2,x3,x4,x5,x6,x7,x8,x10,x11,x12,x13,x14)
@@ -50,7 +50,7 @@ mutable struct PackedVariableNodeData
5050
separator::Array{Symbol,1} # Int
5151
softtype::String
5252
initialized::Bool
53-
partialinit::Bool
53+
inferdim::Float64
5454
ismargin::Bool
5555
dontmargin::Bool
5656
PackedVariableNodeData() = new()
@@ -66,7 +66,7 @@ mutable struct PackedVariableNodeData
6666
x10::Vector{Symbol}, # Int
6767
x11::String,
6868
x12::Bool,
69-
x13::Bool,
69+
x13::Float64,
7070
x14::Bool,
7171
x15::Bool ) = new(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15)
7272
end

src/services/DFGVariable.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function pack(dfg::G, d::VariableNodeData)::PackedVariableNodeData where G <: Ab
88
d.BayesNetOutVertIDs,
99
d.dimIDs, d.dims, d.eliminated,
1010
d.BayesNetVertID, d.separator,
11-
d.softtype != nothing ? string(d.softtype) : nothing, d.initialized, d.partialinit, d.ismargin, d.dontmargin)
11+
d.softtype != nothing ? string(d.softtype) : nothing, d.initialized, d.inferdim, d.ismargin, d.dontmargin)
1212
end
1313

1414
function unpack(dfg::G, d::PackedVariableNodeData)::VariableNodeData where G <: AbstractDFG
@@ -43,7 +43,7 @@ function unpack(dfg::G, d::PackedVariableNodeData)::VariableNodeData where G <:
4343

4444
return VariableNodeData(M3,M4, d.BayesNetOutVertIDs,
4545
d.dimIDs, d.dims, d.eliminated, d.BayesNetVertID, d.separator,
46-
st, d.initialized, d.partialinit, d.ismargin, d.dontmargin )
46+
st, d.initialized, d.inferdim, d.ismargin, d.dontmargin )
4747
end
4848

4949
function compare(a::VariableNodeData,b::VariableNodeData)
@@ -56,7 +56,7 @@ function compare(a::VariableNodeData,b::VariableNodeData)
5656
TP = TP && a.eliminated == b.eliminated
5757
TP = TP && a.BayesNetVertID == b.BayesNetVertID
5858
TP = TP && a.separator == b.separator
59-
TP = TP && a.partialinit == b.partialinit
59+
TP = TP && abs(a.inferdim - b.inferdim) < 1e-14
6060
TP = TP && a.ismargin == b.ismargin
6161
TP = TP && a.softtype == b.softtype
6262
return TP

0 commit comments

Comments
 (0)