Skip to content

Commit 2ce1685

Browse files
authored
Merge pull request #872 from JuliaRobotics/22Q2/end/getmanidfg
new dispatch on getManifold(dfg, lbl), cleaner compat
2 parents 16b82a4 + 6c97d6e commit 2ce1685

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

Project.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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/services/DFGVariable.jl

Lines changed: 3 additions & 2 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

0 commit comments

Comments
 (0)