Skip to content

Commit 018f4d0

Browse files
committed
Return the variable and factor you create
1 parent f99b01d commit 018f4d0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/services/FactorGraph.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,7 @@ function addVariable!(
611611
(:parametric in initsolvekeys) &&
612612
setDefaultNodeDataParametric!(v, varType; initialized = false, dontmargin = dontmargin)
613613

614-
DFG.addVariable!(dfg, v)
615-
616-
return v
614+
return DFG.addVariable!(dfg, v)
617615
end
618616

619617
function parseusermultihypo(multihypo::Nothing, nullhypo::Float64)
@@ -847,12 +845,12 @@ function DFG.addFactor!(
847845
)
848846
#
849847

850-
success = addFactor!(dfg, newFactor)
848+
factor = addFactor!(dfg, newFactor)
851849

852850
# TODO: change this operation to update a conditioning variable
853851
graphinit && doautoinit!(dfg, Xi; singles = false)
854852

855-
return newFactor
853+
return factor
856854
end
857855

858856
function _checkFactorAdd(usrfnc, xisyms)

src/services/JunctionTreeUtils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ function prepBatchTreeOLD!(
847847
end
848848
end
849849

850-
tree = buildTreeFromOrdering!(dfg, p; drawbayesnet = false) # drawbayesnet
850+
tree = buildTreeFromOrdering!(dfg, Symbol.(p); drawbayesnet = false) # drawbayesnet
851851

852852
@info "Bayes Tree Complete"
853853
if drawpdf

0 commit comments

Comments
 (0)