Skip to content

Commit bc5d49c

Browse files
authored
Merge pull request #538 from JuliaRobotics/prep/3Q20/090
cleanup for tagging
2 parents 5cde903 + 92cf348 commit bc5d49c

File tree

6 files changed

+111
-117
lines changed

6 files changed

+111
-117
lines changed

docs/src/variable_factor_serialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ using IncrementalInference, RoME
1818

1919
# Make a variable and a factor:
2020
# Make a simple graph
21-
dfg = GraphsDFG{SolverParams}(params=SolverParams())
21+
dfg = LightDFG{SolverParams}(params=SolverParams())
2222
# Add the first pose :x0
2323
x0 = addVariable!(dfg, :x0, Pose2)
2424
# Add at a fixed location PriorPose2 to pin :x0 to a starting location (10,10, pi/4)
@@ -44,7 +44,7 @@ using IncrementalInference, RoME
4444

4545
# Make a variable and a factor:
4646
# Make a simple graph
47-
dfg = GraphsDFG{SolverParams}(params=SolverParams())
47+
dfg = LightDFG{SolverParams}(params=SolverParams())
4848
# Add the first pose :x0
4949
x0 = addVariable!(dfg, :x0, Pose2)
5050
# Add at a fixed location PriorPose2 to pin :x0 to a starting location (10,10, pi/4)

src/Deprecated.jl

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,23 @@
44

55

66
##==============================================================================
7-
## Remove in 0.9
7+
## Remove in 0.10
88
##==============================================================================
99

10-
import Base: *
11-
12-
function *(a::Symbol, b::AbstractString)
13-
@warn "product * on ::Symbol ::String has been deprecated, please use Symbol(string(a,b)) or Symbol(a,b) directly"
14-
Symbol(string(a,b))
15-
end
16-
17-
setTimestamp!(f::FactorDataLevel1, ts::DateTime) = error("setTimestamp!(f::FactorDataLevel1, ts::DateTime) is deprecated")
18-
19-
export GraphsDFG
20-
struct GraphsDFG{AbstractParams}
21-
GraphsDFG{T}() where T = error("GraphsDFG is deprecated, use LightDFG, see https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues/398")
22-
end
23-
GraphsDFG(args...; kwargs...) = GraphsDFG{AbstractParams}()
24-
GraphsDFG{T}(args...; kwargs...) where T = GraphsDFG{T}()
25-
10+
export listSolvekeys
2611

27-
@deprecate getInternalId(args...) error("getInternalId is no longer in use")
12+
@deprecate listSolvekeys(x...) listSolveKeys(x...)
2813

29-
@deprecate loadDFG(source::AbstractString, iifModule::Module, dest::AbstractDFG) loadDFG!(dest, source)
30-
@deprecate loadDFG(dest::AbstractDFG, source::AbstractString) loadDFG!(dest, source)
14+
export InferenceType
15+
export FunctorSingleton, FunctorPairwise, FunctorPairwiseMinimize
3116

32-
# leave a bit longer
33-
export buildSubgraphFromLabels!
34-
function buildSubgraphFromLabels!(dfg::AbstractDFG,
35-
syms::Vector{Symbol};
36-
subfg::AbstractDFG=LightDFG(solverParams=getSolverParams(dfg)),
37-
solvable::Int=0,
38-
allowedFactors::Union{Nothing, Vector{Symbol}}=nothing )
39-
error("""buildSubgraphFromLabels! is deprecated
40-
NOTE buildSubgraphFromLabels! does not have a 1-1 replacement in DFG
41-
- if you have a set of variables and factors use copyGraph
42-
- if you want neighbors automatically included use buildSubgraph
43-
- if you want a clique subgraph use buildCliqueSubgraph! from IIF
44-
""")
45-
46-
end
17+
abstract type InferenceType end
4718

4819
# These will become AbstractPrior, AbstractRelativeFactor, and AbstractRelativeFactorMinimize in 0.9.
4920
abstract type FunctorSingleton <: FunctorInferenceType end
5021
abstract type FunctorPairwise <: FunctorInferenceType end
5122
abstract type FunctorPairwiseMinimize <: FunctorInferenceType end
5223

53-
##==============================================================================
54-
## Remove in 0.10
55-
##==============================================================================
56-
5724
# I don't know how to deprecate this, any suggestions?
5825
const AbstractBigDataEntry = AbstractDataEntry
5926

src/DistributedFactorGraphs.jl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ export emptyUserData!, emptyRobotData!, emptySessionData!
5555

5656
# Graph Types: exported from modules or @reexport
5757
export InMemoryDFGTypes, DefaultDFG
58-
# LightDFG
59-
# GraphsDFG
60-
61-
# CloudGraphsDFG
62-
# FileDFG
6358

6459
# AbstractDFG Interface
6560
export exists,
@@ -68,7 +63,7 @@ export exists,
6863
updateVariable!, updateFactor!,
6964
deleteVariable!, deleteFactor!,
7065
listVariables, listFactors,
71-
listSolvekeys, listSupersolves,
66+
listSolveKeys, listSupersolves,
7267
getVariables, getFactors,
7368
isVariable, isFactor
7469

@@ -181,10 +176,9 @@ export addData!, fetchData, fetchDataEntryBlob
181176
##------------------------------------------------------------------------------
182177
# Factor Data
183178
export GenericFunctionNodeData, PackedFunctionNodeData, FunctionNodeData
184-
export InferenceType, PackedInferenceType, FunctorInferenceType, FactorOperationalMemory
179+
export FunctorInferenceType, PackedInferenceType
185180
export AbstractPrior, AbstractRelativeFactor, AbstractRelativeFactorMinimize
186-
#Deprecated
187-
export FunctorSingleton, FunctorPairwise, FunctorPairwiseMinimize
181+
export FactorOperationalMemory
188182

189183
# accessors
190184
export getVariableOrder
@@ -259,7 +253,7 @@ include("entities/AbstractDFGSummary.jl")
259253
include("services/AbstractDFG.jl")
260254

261255
# In Memory Types
262-
# include("GraphsDFG/GraphsDFG.jl")
256+
# include("../attic/GraphsDFG/GraphsDFG.jl")
263257
# @reexport using .GraphsDFGs
264258
include("LightDFG/LightDFG.jl")
265259
@reexport using .LightDFGs

src/entities/DFGFactor.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
## Abstract Types
33
##==============================================================================
44

5-
abstract type InferenceType end
6-
abstract type PackedInferenceType end
7-
85
abstract type FunctorInferenceType <: Function end
6+
abstract type PackedInferenceType end
97

108
# NOTE DF, Convolution is IIF idea, but DFG should know about "FactorOperationalMemory"
119
# DF, IIF.CommonConvWrapper <: FactorOperationalMemory #
@@ -30,9 +28,9 @@ Notes
3028
3129
Designing (WIP)
3230
- T <: Union{FactorOperationalMemory, PackedInferenceType}
33-
- in IIF.CCW{T <: DFG.InferenceType}
34-
- in IIF.FunctorPairwiseMinimize <: InferenceType # DFG whatever, something, we'll figure it out
35-
- in Main/User, SomeFactor <: FunctorPairwiseMinimize
31+
- in IIF.CCW{T <: DFG.FunctorInferenceType}
32+
- in DFG.AbstractRelativeFactorMinimize <: FunctorInferenceType
33+
- in Main.SomeFactor <: AbstractRelativeFactorMinimize
3634
"""
3735
mutable struct GenericFunctionNodeData{T<:Union{PackedInferenceType, FunctorInferenceType, FactorOperationalMemory}}
3836
eliminated::Bool

0 commit comments

Comments
 (0)