522
522
# ## These functions write back as you add the data.
523
523
524
524
function addVariableSolverData! (dfg:: CloudGraphsDFG , variablekey:: Symbol , vnd:: VariableNodeData , solvekey:: Symbol = :default ):: VariableNodeData
525
- # TODO : Just get the property, update it, and send it back
525
+ # TODO : Switch out to their own nodes, don't get the whole variable
526
526
var = getVariable (dfg, variablekey)
527
527
if haskey (var. solverDataDict, solvekey)
528
528
error (" VariableNodeData '$(solvekey) ' already exists" )
@@ -539,7 +539,7 @@ function addVariableSolverData!(dfg::CloudGraphsDFG, variablekey::Symbol, vnd::V
539
539
end
540
540
541
541
function updateVariableSolverData! (dfg:: CloudGraphsDFG , variablekey:: Symbol , vnd:: VariableNodeData , solvekey:: Symbol = :default ):: VariableNodeData
542
- # This is basically just setSolverData
542
+ # TODO : Switch out to their own nodes, don't get the whole variable
543
543
var = getVariable (dfg, variablekey)
544
544
if ! haskey (var. solverDataDict, solvekey)
545
545
@warn " VariableNodeData '$(solvekey) ' does not exist, adding"
@@ -556,13 +556,15 @@ function updateVariableSolverData!(dfg::CloudGraphsDFG, variablekey::Symbol, vnd
556
556
end
557
557
558
558
function updateVariableSolverData! (dfg:: CloudGraphsDFG , sourceVariables:: Vector{<:DFGVariable} , solvekey:: Symbol = :default )
559
+ # TODO : Switch out to their own nodes, don't get the whole variable
559
560
# TODO : Do in bulk for speed.
560
561
for var in sourceVariables
561
562
updateVariableSolverData! (dfg, var. label, getSolverData (var, solvekey), solvekey)
562
563
end
563
564
end
564
565
565
566
function deleteVariableSolverData! (dfg:: CloudGraphsDFG , variablekey:: Symbol , solvekey:: Symbol = :default ):: VariableNodeData
567
+ # TODO : Switch out to their own nodes, don't get the whole variable
566
568
var = getVariable (dfg, variablekey)
567
569
568
570
if ! haskey (var. solverDataDict, solvekey)
0 commit comments