Skip to content

Commit a64b31f

Browse files
committed
change cloudgraphs mergeUpdate api
1 parent a190919 commit a64b31f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/CloudGraphsDFG/services/CloudGraphsDFG.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,12 @@ function updateVariable!(dfg::CloudGraphsDFG, variable::DFGVariable)::DFGVariabl
220220
return variable
221221
end
222222

223-
function mergeUpdateVariableSolverData!(dfg::CloudGraphsDFG, sourceVariable::DFGVariable)::DFGVariable
223+
function mergeVariableData!(dfg::CloudGraphsDFG, sourceVariable::DFGVariable)::DFGVariable
224224
if !exists(dfg, sourceVariable)
225225
error("Source variable '$(sourceVariable.label)' doesn't exist in the graph.")
226226
end
227227
for (k,v) in sourceVariable.ppeDict
228+
# TODO what is happening inside, is this truely an update or is it a merge? (API consistency hounds are apon you)
228229
updatePPE!(dfg, getLabel(sourceVariable), v, k)
229230
end
230231
for (k,v) in sourceVariable.solverDataDict
@@ -233,6 +234,10 @@ function mergeUpdateVariableSolverData!(dfg::CloudGraphsDFG, sourceVariable::DFG
233234
return sourceVariable
234235
end
235236

237+
function mergeUpdateVariableSolverData!(dfg::CloudGraphsDFG, sourceVariable::DFGVariable)::DFGVariable
238+
mergeVariableData!(dfg, sourceVariable)
239+
end
240+
236241
function updateFactor!(dfg::CloudGraphsDFG, factor::DFGFactor)::DFGFactor
237242
if !exists(dfg, factor)
238243
@warn "Factor label '$(factor.label)' does not exist in the factor graph, adding"

0 commit comments

Comments
 (0)