@@ -4,6 +4,7 @@ using Dates
4
4
using Manifolds
5
5
6
6
import Base: convert
7
+ import DistributedFactorGraphs: reconstFactorData
7
8
8
9
# Test InferenceVariable Types
9
10
# struct TestVariableType1 <: InferenceVariable
@@ -43,11 +44,17 @@ function Base.convert(::Type{PackedTestFunctorInferenceType1}, d::TestFunctorInf
43
44
PackedTestFunctorInferenceType1 ()
44
45
end
45
46
46
- function Base. convert (:: Type{TestFunctorInferenceType1} , d:: PackedTestFunctorInferenceType1 )
47
+ function reconstFactorData (dfg:: AbstractDFG , vo:: AbstractVector , :: Type{TestFunctorInferenceType1} , d:: PackedTestFunctorInferenceType1 , :: String )
48
+ TestFunctorInferenceType1 ()
49
+ end
50
+
51
+ # overly simplified test requires both reconstitute and convert
52
+ function Base. convert (:: Type{TestFunctorInferenceType1} , d:: PackedTestFunctorInferenceType1 )
47
53
# @info "convert(::Type{TestFunctorInferenceType1}, d::PackedTestFunctorInferenceType1)"
48
54
TestFunctorInferenceType1 ()
49
55
end
50
56
57
+
51
58
struct PackedTestAbstractPrior <: PackedInferenceType
52
59
s:: String
53
60
end
@@ -74,20 +81,29 @@ Base.:(==)(a::TestCCW, b::TestCCW) = a.usrfnc! == b.usrfnc!
74
81
DFG. getFactorOperationalMemoryType (par:: NoSolverParams ) = TestCCW
75
82
DFG. rebuildFactorMetadata! (dfg:: AbstractDFG{NoSolverParams} , fac:: DFGFactor ) = fac
76
83
77
- function Base. convert (:: Type{DFG.FunctionNodeData{TestCCW{F}}} ,
78
- d:: DFG.PackedFunctionNodeData{<:AbstractPackedFactor} ) where {F <: DFG.AbstractFactor }
79
-
84
+ function reconstFactorData (dfg:: AbstractDFG ,
85
+ vo:: AbstractVector ,
86
+ :: Type{<:DFG.FunctionNodeData{TestCCW{F}}} ,
87
+ d:: DFG.PackedFunctionNodeData{<:AbstractPackedFactor} ) where {F <: DFG.AbstractFactor }
88
+ nF = convert (F, d. fnc)
80
89
return DFG. FunctionNodeData (d. eliminated,
81
90
d. potentialused,
82
91
d. edgeIDs,
83
- TestCCW (convert (F, d . fnc) ),
92
+ TestCCW (nF ),
84
93
d. multihypo,
85
94
d. certainhypo,
86
95
d. nullhypo,
87
96
d. solveInProgress,
88
97
d. inflation)
89
98
end
90
99
100
+ function convert ( T:: Type{DFG.FunctionNodeData{TestCCW{F}}} ,
101
+ d:: DFG.PackedFunctionNodeData{<:AbstractPackedFactor} ) where {F <: DFG.AbstractFactor }
102
+ #
103
+ @error (" DEPRECATING $T " )
104
+ reconstFactorData (T, d, " " )
105
+ end
106
+
91
107
function Base. convert (:: Type{DFG.PackedFunctionNodeData{P}} , d:: DFG.FunctionNodeData{<:FactorOperationalMemory} ) where P <: AbstractPackedFactor
92
108
return DFG. PackedFunctionNodeData (d. eliminated,
93
109
d. potentialused,
0 commit comments