@@ -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
154154function sampleTangent (x:: ManifoldKernelDensity , p = mean (x))
155155 error (" sampleTangent(x::ManifoldKernelDensity, p) should be replaced by sampleTangent(M<:AbstractManifold, x::ManifoldKernelDensity, p)" )
0 commit comments