Skip to content

Commit af19735

Browse files
committed
Moved to AbstractDFG and removed InMemoryTypes
1 parent ad6917d commit af19735

File tree

3 files changed

+14
-24
lines changed

3 files changed

+14
-24
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,5 @@ end
7878

7979
# To be moved as necessary.
8080
include("Common.jl")
81-
include("services/CommonInMemoryDFG.jl")
8281

8382
end

src/services/AbstractDFG.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ function _copyIntoGraph!(sourceDFG::G, destDFG::H, variableFactorLabels::Vector{
6767
return nothing
6868
end
6969

70+
"""
71+
$(SIGNATURES)
72+
Update solver and estimate data for a variable (variable can be from another graph).
73+
"""
74+
function updateVariableSolverData!(dfg::AbstractDFG, sourceVariable::DFGVariable)::DFGVariable
75+
if !exists(dfg, sourceVariable)
76+
error("Source variable '$(sourceVariable.label)' doesn't exist in the graph.")
77+
end
78+
var = getVariable(dfg, sourceVariable.label)
79+
merge!(var.estimateDict, sourceVariable.estimateDict)
80+
merge!(var.solverDataDict, sourceVariable.solverDataDict)
81+
return sourceVariable
82+
end
83+
7084
"""
7185
$(SIGNATURES)
7286
Common function to update all solver data and estimates from one graph to another.

src/services/CommonInMemoryDFG.jl

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)