Skip to content

Commit 142864b

Browse files
committed
add getManifold for (dfg, lbl)
1 parent 16b82a4 commit 142864b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)