Skip to content

Commit 0685566

Browse files
committed
cleanup new identifiers
1 parent 59bdfec commit 0685566

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export getSolverData
135135
export getVariableType
136136

137137
# VariableType functions
138-
export getDimension, getManifolds
138+
export getDimension, getManifolds, getManifold
139139

140140
# Small Data CRUD
141141
export SmallDataTypes, getSmallData, addSmallData!, updateSmallData!, deleteSmallData!, listSmallData, emptySmallData!

src/services/DFGVariable.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ Interface function to return the `variableType` manifolds of an InferenceVariabl
7575
"""
7676
function getManifolds end
7777

78+
getManifolds(::Type{<:T}) where {T <: ManifoldsBase.Manifold} = convert(Tuple, T)
79+
getManifolds(::T) where {T <: ManifoldsBase.Manifold} = convert(Tuple, T)
80+
7881
"""
7982
@defVariable StructName manifolds<:ManifoldsBase.Manifold
8083
@@ -96,14 +99,15 @@ macro defVariable(structname, manifold)
9699
# user manifold must be a <:Manifold
97100
Base.convert(::Type{<:Manifold}, ::Union{<:T, Type{<:T}}) where {T <: $structname} = $manifold
98101

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)
101104

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)
107111
end)
108112
end
109113

0 commit comments

Comments
 (0)