@@ -75,6 +75,9 @@ Interface function to return the `variableType` manifolds of an InferenceVariabl
75
75
"""
76
76
function getManifolds end
77
77
78
+ getManifolds (:: Type{<:T} ) where {T <: ManifoldsBase.Manifold } = convert (Tuple, T)
79
+ getManifolds (:: T ) where {T <: ManifoldsBase.Manifold } = convert (Tuple, T)
80
+
78
81
"""
79
82
@defVariable StructName manifolds<:ManifoldsBase.Manifold
80
83
@@ -96,14 +99,15 @@ macro defVariable(structname, manifold)
96
99
# user manifold must be a <:Manifold
97
100
Base. convert (:: Type{<:Manifold} , :: Union{<:T, Type{<:T}} ) where {T <: $structname } = $ manifold
98
101
99
- getManifold (:: Type{M} ) where {M <: $structname } = $ manifold
100
- getManifold (:: M ) where {M <: $structname } = getManifold (M)
102
+ DFG . getManifold (:: Type{M} ) where {M <: $structname } = $ manifold
103
+ DFG . getManifold (:: M ) where {M <: $structname } = getManifold (M)
101
104
102
- getDimension (:: Type{M} ) where {M <: $structname } = manifold_dimension (getManifold (M))
103
- getDimension (:: M ) where {M <: $structname } = manifold_dimension (getManifold (M))
104
- # FIXME legacy API to be deprecated
105
- getManifolds (:: Type{M} ) where {M <: $structname } = convert (Tuple, $ manifold)
106
- getManifolds (:: M ) where {M <: $structname } = convert (Tuple, $ manifold)
105
+ DFG. getDimension (:: Type{M} ) where {M <: $structname } = manifold_dimension (getManifold (M))
106
+ DFG. getDimension (:: M ) where {M <: $structname } = manifold_dimension (getManifold (M))
107
+
108
+ # # FIXME legacy API to be deprecated
109
+ DFG. getManifolds (:: Type{M} ) where {M <: $structname } = convert (Tuple, $ manifold)
110
+ DFG. getManifolds (:: M ) where {M <: $structname } = convert (Tuple, $ manifold)
107
111
end )
108
112
end
109
113
0 commit comments