Skip to content

Commit 8c54722

Browse files
authored
rm FunctionNodeData related deprecated names (#1883)
1 parent 1894b15 commit 8c54722

3 files changed

Lines changed: 90 additions & 90 deletions

File tree

IncrementalInference/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Combinatorics = "1.0"
7575
DataStructures = "0.16, 0.17, 0.18"
7676
DelimitedFiles = "1"
7777
DifferentialEquations = "7"
78-
DistributedFactorGraphs = "0.26, 0.27"
78+
DistributedFactorGraphs = "0.27, 0.28"
7979
Distributions = "0.24, 0.25"
8080
DocStringExtensions = "0.8, 0.9"
8181
FileIO = "1"

IncrementalInference/src/Deprecated.jl

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -53,103 +53,103 @@ end
5353
## packing converters-----------------------------------------------------------
5454
# heavy use of multiple dispatch for converting between packed and original data types during DB usage
5555

56-
function convert(
57-
::Type{DFG.PackedFunctionNodeData{P}},
58-
d::DFG.FunctionNodeData{T},
59-
) where {P <: AbstractPackedObservation, T <: FactorCache}
60-
error("TODO remove. PackedFunctionNodeData is obsolete")
61-
return DFG.PackedFunctionNodeData(
62-
d.eliminated,
63-
d.potentialused,
64-
d.edgeIDs,
65-
convert(P, _getCCW(d).usrfnc!),
66-
d.multihypo,
67-
_getCCW(d).hyporecipe.certainhypo,
68-
d.nullhypo,
69-
d.solveInProgress,
70-
d.inflation,
71-
) # extract two values from ccw for storage -- ccw thrown away
72-
end
56+
# function convert(
57+
# ::Type{DFG.PackedFunctionNodeData{P}},
58+
# d::DFG.FunctionNodeData{T},
59+
# ) where {P <: AbstractPackedObservation, T <: FactorCache}
60+
# error("TODO remove. PackedFunctionNodeData is obsolete")
61+
# return DFG.PackedFunctionNodeData(
62+
# d.eliminated,
63+
# d.potentialused,
64+
# d.edgeIDs,
65+
# convert(P, _getCCW(d).usrfnc!),
66+
# d.multihypo,
67+
# _getCCW(d).hyporecipe.certainhypo,
68+
# d.nullhypo,
69+
# d.solveInProgress,
70+
# d.inflation,
71+
# ) # extract two values from ccw for storage -- ccw thrown away
72+
# end
7373

7474
## unpack converters------------------------------------------------------------
7575
# see #1424
7676
#TODO Consolidate: this looks alot like `getDefaultFactorData`
77-
function DFG.reconstFactorData(
78-
dfg::AbstractDFG,
79-
varOrder::AbstractVector{Symbol},
80-
::Type{<:DFG.GenericFunctionNodeData{<:CommonConvWrapper{F}}},
81-
packed::DFG.GenericFunctionNodeData{<:AbstractPackedObservation},
82-
) where {F <: AbstractObservation}
83-
84-
error("TODO remove. Obsolete: use `DFG.rebuildFactorCache!` and getDefaultFactorData instead.")
85-
#
86-
# TODO store threadmodel=MutliThreaded,SingleThreaded in persistence layer
87-
usrfnc = convert(F, packed.fnc)
88-
multihypo, nullhypo = parseusermultihypo(packed.multihypo, packed.nullhypo)
89-
90-
# IIF #1424
91-
vars = map(f -> getVariable(dfg, f), varOrder)
92-
userCache = preambleCache(dfg, vars, usrfnc)
93-
94-
# TODO -- improve _createCCW for hypotheses and certainhypo field recovery when deserializing
95-
# reconstitute from stored data
96-
# FIXME, add threadmodel=threadmodel
97-
# FIXME https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues/590#issuecomment-776838053
98-
# FIXME dont know what manifolds to use in ccw
99-
ccw = _createCCW(
100-
vars,
101-
usrfnc;
102-
multihypo,
103-
nullhypo,
104-
certainhypo = packed.certainhypo,
105-
inflation = packed.inflation,
106-
userCache,
107-
attemptGradients = getSolverParams(dfg).attemptGradients,
108-
# Block recursion if NoSolverParams or if set to not attempt gradients.
109-
_blockRecursion=
110-
getSolverParams(dfg) isa NoSolverParams ||
111-
!getSolverParams(dfg).attemptGradients,
112-
)
113-
#
77+
# function DFG.reconstFactorData(
78+
# dfg::AbstractDFG,
79+
# varOrder::AbstractVector{Symbol},
80+
# ::Type{<:DFG.GenericFunctionNodeData{<:CommonConvWrapper{F}}},
81+
# packed::DFG.GenericFunctionNodeData{<:AbstractPackedObservation},
82+
# ) where {F <: AbstractObservation}
83+
84+
# error("TODO remove. Obsolete: use `DFG.rebuildFactorCache!` and getDefaultFactorData instead.")
85+
# #
86+
# # TODO store threadmodel=MutliThreaded,SingleThreaded in persistence layer
87+
# usrfnc = convert(F, packed.fnc)
88+
# multihypo, nullhypo = parseusermultihypo(packed.multihypo, packed.nullhypo)
89+
90+
# # IIF #1424
91+
# vars = map(f -> getVariable(dfg, f), varOrder)
92+
# userCache = preambleCache(dfg, vars, usrfnc)
93+
94+
# # TODO -- improve _createCCW for hypotheses and certainhypo field recovery when deserializing
95+
# # reconstitute from stored data
96+
# # FIXME, add threadmodel=threadmodel
97+
# # FIXME https://github.com/JuliaRobotics/DistributedFactorGraphs.jl/issues/590#issuecomment-776838053
98+
# # FIXME dont know what manifolds to use in ccw
99+
# ccw = _createCCW(
100+
# vars,
101+
# usrfnc;
102+
# multihypo,
103+
# nullhypo,
104+
# certainhypo = packed.certainhypo,
105+
# inflation = packed.inflation,
106+
# userCache,
107+
# attemptGradients = getSolverParams(dfg).attemptGradients,
108+
# # Block recursion if NoSolverParams or if set to not attempt gradients.
109+
# _blockRecursion=
110+
# getSolverParams(dfg) isa NoSolverParams ||
111+
# !getSolverParams(dfg).attemptGradients,
112+
# )
113+
# #
114114

115-
# CommonConvWrapper{typeof(usrfnc)}
116-
ret = DFG.FunctionNodeData{typeof(ccw)}(
117-
packed.eliminated,
118-
packed.potentialused,
119-
packed.edgeIDs,
120-
ccw,
121-
packed.multihypo,
122-
packed.certainhypo,
123-
packed.nullhypo,
124-
packed.solveInProgress,
125-
packed.inflation,
126-
)
127-
#
128-
return ret
129-
end
115+
# # CommonConvWrapper{typeof(usrfnc)}
116+
# ret = DFG.FunctionNodeData{typeof(ccw)}(
117+
# packed.eliminated,
118+
# packed.potentialused,
119+
# packed.edgeIDs,
120+
# ccw,
121+
# packed.multihypo,
122+
# packed.certainhypo,
123+
# packed.nullhypo,
124+
# packed.solveInProgress,
125+
# packed.inflation,
126+
# )
127+
# #
128+
# return ret
129+
# end
130130

131-
function _getDimensionsPartial(data::DFG.GenericFunctionNodeData)
132-
Base.depwarn(
133-
"_getDimensionsPartial(data::GenericFunctionNodeData) is deprecated, use solvercache <: FactorCache instead",
134-
:_getDimensionsPartial,
135-
)
136-
return _getCCW(data) |> _getDimensionsPartial
137-
end
131+
# function _getDimensionsPartial(data::DFG.GenericFunctionNodeData)
132+
# Base.depwarn(
133+
# "_getDimensionsPartial(data::GenericFunctionNodeData) is deprecated, use solvercache <: FactorCache instead",
134+
# :_getDimensionsPartial,
135+
# )
136+
# return _getCCW(data) |> _getDimensionsPartial
137+
# end
138138

139-
"""
140-
$SIGNATURES
141-
Get the CommonConvWrapper for this factor.
142-
"""
143-
function _getCCW(gfnd::DFG.GenericFunctionNodeData)
144-
error("_getCCW(gfnd::DFG.GenericFunctionNodeData) is deprecated, use DFG.getCache instead.")
145-
end
139+
# """
140+
# $SIGNATURES
141+
# Get the CommonConvWrapper for this factor.
142+
# """
143+
# function _getCCW(gfnd::DFG.GenericFunctionNodeData)
144+
# error("_getCCW(gfnd::DFG.GenericFunctionNodeData) is deprecated, use DFG.getCache instead.")
145+
# end
146146

147-
_getZDim(fcd::DFG.GenericFunctionNodeData) = _getCCW(fcd) |> _getZDim
148-
DFG.getDimension(fct::DFG.GenericFunctionNodeData) = _getZDim(fct)
147+
# _getZDim(fcd::DFG.GenericFunctionNodeData) = _getCCW(fcd) |> _getZDim
148+
# DFG.getDimension(fct::DFG.GenericFunctionNodeData) = _getZDim(fct)
149149

150-
function resetData!(vdata::DFG.FunctionNodeData)
151-
error("resetData!(vdata::FunctionNodeData) is deprecated, use resetData!(state::FactorState) instead")
152-
end
150+
# function resetData!(vdata::DFG.FunctionNodeData)
151+
# error("resetData!(vdata::FunctionNodeData) is deprecated, use resetData!(state::FactorState) instead")
152+
# end
153153

154154
function sampleTangent(x::ManifoldKernelDensity, p = mean(x))
155155
error("sampleTangent(x::ManifoldKernelDensity, p) should be replaced by sampleTangent(M<:AbstractManifold, x::ManifoldKernelDensity, p)")

IncrementalInferenceTypes/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4"
1818
[compat]
1919
Dates = "1.10.0"
2020
Distributed = "1.10.0"
21-
DistributedFactorGraphs = "0.27.0"
21+
DistributedFactorGraphs = "0.27, 0.28.0"
2222
Distributions = "0.25.120"
2323
DocStringExtensions = "0.9.5"
2424
LieGroups = "0.1.2"

0 commit comments

Comments
 (0)