Skip to content

Commit 96e1406

Browse files
authored
Merge pull request #873 from JuliaRobotics/master
release v0.18.2-rc1
2 parents efd2df6 + 2ce1685 commit 96e1406

File tree

4 files changed

+65
-32
lines changed

4 files changed

+65
-32
lines changed

Project.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DistributedFactorGraphs"
22
uuid = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
3-
version = "0.18.1"
3+
version = "0.18.2"
44

55
[deps]
66
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -26,9 +26,9 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
2626
Unmarshal = "cbff2730-442d-58d7-89d1-8e530c41eb02"
2727

2828
[compat]
29-
Colors = "0.8, 0.9, 0.10, 0.11, 0.12"
30-
Distributions = "0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25, 1"
31-
DocStringExtensions = "0.8, 0.9, 0.10, 1"
29+
Colors = "0.10, 0.11, 0.12"
30+
Distributions = "0.23, 0.24, 0.25"
31+
DocStringExtensions = "0.8"
3232
Graphs = "1.4"
3333
GraphPlot = "0.5.0"
3434
JSON = "0.21"
@@ -37,12 +37,12 @@ LightGraphs = "1.2, 1.3"
3737
ManifoldsBase = "0.11, 0.12"
3838
Neo4j = "2"
3939
Pkg = "1.4, 1.5"
40-
Reexport = "0.2, 0.3, 0.4, 0.5, 1"
41-
Requires = "0.5, 1"
40+
Reexport = "1"
41+
Requires = "1"
4242
TensorCast = "0.3.3, 0.4"
4343
TimeZones = "1.3.1"
4444
Unmarshal = "0.4"
45-
julia = "1.4"
45+
julia = "1.6"
4646

4747
[extras]
4848
GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"

src/Deprecated.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ end
6666
## Deprecate before v0.19
6767
##=================================================================================
6868

69+
# FIXME, change this to a deprecation in v0.19
70+
export deepcopySupersolve!, deepcopySolvekeys!
71+
const deepcopySupersolve! = cloneSolveKey!
72+
# @deprecate deepcopySupersolve!(w...;kw...) cloneSolveKey!(w...;kw...)
73+
const deepcopySolvekeys! = cloneSolveKey!
74+
# @deprecate deepcopySolvekeys!(w...;kw...) cloneSolveKey!(w...;kw...)
75+
6976
@deprecate dfgplot(w...;kw...) plotDFG(w...;kw...)
7077

7178
export FunctorInferenceType, PackedInferenceType
@@ -81,4 +88,14 @@ export DefaultDFG
8188

8289
const DefaultDFG = LightDFG
8390

91+
92+
## ================================================================================
93+
## Deprecate before v0.20
94+
##=================================================================================
95+
96+
# FIXME uncomment before start of v0.19
97+
# @deprecate deepcopySupersolve!(w...;kw...) cloneSolveKey!(w...;kw...)
98+
# @deprecate deepcopySolvekeys!(w...;kw...) cloneSolveKey!(w...;kw...)
99+
100+
84101
#

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ export getVariableSolverData,
154154
deleteVariableSolverData!,
155155
listVariableSolverData,
156156
mergeVariableSolverData!,
157-
deepcopySolvekeys!,
158-
deepcopySupersolve!
157+
cloneSolveKey!
159158

160159

161160
# PPE

src/services/DFGVariable.jl

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@ Base.convert(::Type{<:AbstractManifold}, ::Union{<:T, Type{<:T}}) where {T <: In
113113
$SIGNATURES
114114
Interface function to return the `<:ManifoldsBase.AbstractManifold` object of `variableType<:InferenceVariable`.
115115
"""
116-
getManifold(vari::DFGVariable) = getVariableType(vari) |> getManifold
117116
getManifold(::T) where {T <: InferenceVariable} = getManifold(T)
118-
117+
getManifold(vari::DFGVariable) = getVariableType(vari) |> getManifold
118+
# covers both <:InferenceVariable and <:AbstractFactor
119+
getManifold(dfg::AbstractDFG, lbl::Symbol) = getManifold(dfg[lbl])
119120

120121
"""
121122
$SIGNATURES
@@ -680,12 +681,12 @@ function updateVariableSolverData!( dfg::AbstractDFG,
680681
updateVariableSolverData!(dfg, sourceVariable.label, vnd, useCopy, fields; warn_if_absent=warn_if_absent)
681682
end
682683

683-
function updateVariableSolverData!(dfg::AbstractDFG,
684-
sourceVariables::Vector{<:DFGVariable},
685-
solveKey::Symbol=:default,
686-
useCopy::Bool=true,
687-
fields::Vector{Symbol}=Symbol[];
688-
warn_if_absent::Bool=true)
684+
function updateVariableSolverData!( dfg::AbstractDFG,
685+
sourceVariables::Vector{<:DFGVariable},
686+
solveKey::Symbol=:default,
687+
useCopy::Bool=true,
688+
fields::Vector{Symbol}=Symbol[];
689+
warn_if_absent::Bool=true)
689690
#I think cloud would do this in bulk for speed
690691
for var in sourceVariables
691692
updateVariableSolverData!(dfg, var.label, getSolverData(var, solveKey), useCopy, fields; warn_if_absent=warn_if_absent)
@@ -694,22 +695,38 @@ end
694695

695696
"""
696697
$SIGNATURES
697-
Duplicate a supersolve (solveKey).
698-
"""
699-
function deepcopySolvekeys!(dfg::AbstractDFG,
700-
dest::Symbol,
701-
src::Symbol;
702-
solvable::Int=0,
703-
labels=ls(dfg, solvable=solvable),
704-
verbose::Bool=false )
705-
#
706-
for x in labels
707-
sd = deepcopy(getSolverData(getVariable(dfg,x), src))
708-
sd.solveKey = dest
709-
updateVariableSolverData!(dfg, x, sd, true, Symbol[]; warn_if_absent=verbose )
710-
end
698+
Duplicate a `solveKey`` into a destination from a source.
699+
700+
Notes
701+
- Can copy between graphs, or to different solveKeys within one graph.
702+
"""
703+
function cloneSolveKey!(dest_dfg::AbstractDFG,
704+
dest::Symbol,
705+
src_dfg::AbstractDFG,
706+
src::Symbol;
707+
solvable::Int=0,
708+
labels=intersect(ls(dest_dfg, solvable=solvable), ls(src_dfg, solvable=solvable)),
709+
verbose::Bool=false )
710+
#
711+
for x in labels
712+
sd = deepcopy(getSolverData(getVariable(src_dfg, x), src))
713+
sd.solveKey = dest
714+
updateVariableSolverData!(dest_dfg, x, sd, true, Symbol[]; warn_if_absent=verbose )
715+
end
716+
717+
nothing
711718
end
712-
const deepcopySupersolve! = deepcopySolvekeys!
719+
720+
function cloneSolveKey!( dfg::AbstractDFG,
721+
dest::Symbol,
722+
src::Symbol;
723+
kw... )
724+
#
725+
@assert dest != src "Must copy to a different solveKey within the same graph, $dest."
726+
cloneSolveKey!(dfg, dest, dfg, src; kw...)
727+
end
728+
729+
#
713730

714731
"""
715732
$(SIGNATURES)

0 commit comments

Comments
 (0)