You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interface function to return the `variableType` dimension of an InferenceVariable, extend this function for all Types<:InferenceVariable.
69
-
"""
70
-
function getDimension end
71
-
"""
72
-
$SIGNATURES
73
-
Interface function to return the `<:ManifoldsBase.AbstractManifold` object of `variableType<:InferenceVariable`, extend this function for all `Types<:InferenceVariable`.
@assert ($manifold isa AbstractManifold) "@defVariable of "*string($structname)*" requires that the "*string($manifold)*" be a subtype of `ManifoldsBase.AbstractManifold`"
105
-
106
93
# user manifold must be a <:Manifold
107
-
Base.convert(::Type{<:AbstractManifold}, ::Union{<:T, Type{<:T}}) where {T <:$structname} =$manifold
94
+
@assert ($manifold isa AbstractManifold) "@defVariable of "*string($structname)*" requires that the "*string($manifold)*" be a subtype of `ManifoldsBase.AbstractManifold`"
108
95
109
-
getManifold(::Type{M}) where {M <:$structname} =$manifold
110
-
getManifold(::M) where {M <:$structname} =getManifold(M)
111
-
112
-
DFG.getDimension(::Type{M}) where {M <:$structname} =manifold_dimension(getManifold(M))
113
-
DFG.getDimension(::M) where {M <:$structname} =manifold_dimension(getManifold(M))
96
+
DFG.getManifold(::Type{$structname}) =$manifold
114
97
115
-
# # # FIXME legacy API to be deprecated
116
-
# DFG.getManifolds(::Type{M}) where {M <: $structname} = convert(Tuple, $manifold)
117
-
# DFG.getManifolds(::M) where {M <: $structname} = convert(Tuple, $manifold)
118
98
end)
119
99
end
120
100
101
+
Base.convert(::Type{<:AbstractManifold}, ::Union{<:T, Type{<:T}}) where {T <:InferenceVariable} =getManifold(T)
102
+
103
+
"""
104
+
$SIGNATURES
105
+
Interface function to return the `<:ManifoldsBase.AbstractManifold` object of `variableType<:InferenceVariable`.
0 commit comments