Skip to content

Commit a6451e3

Browse files
authored
Merge pull request #726 from JuliaRobotics/21Q1/refact/abstractfactor
add AbstractFactor and AbstractPackedFactor
2 parents b2ae67e + 4a202fa commit a6451e3

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ export addData!
193193
##------------------------------------------------------------------------------
194194
# Factor Data
195195
export GenericFunctionNodeData, PackedFunctionNodeData, FunctionNodeData
196-
export FunctorInferenceType, PackedInferenceType
196+
export AbstractFactor, AbstractPackedFactor
197+
export FunctorInferenceType, PackedInferenceType # NOTE might be deprecated in the future (const aliases)
197198
export AbstractPrior, AbstractRelative, AbstractRelativeRoots, AbstractRelativeMinimize
198199
export FactorOperationalMemory
199200

src/entities/DFGFactor.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
##==============================================================================
44

55
# TODO consider changing this to AbstractFactor
6-
abstract type FunctorInferenceType <: Function end
7-
abstract type PackedInferenceType end
6+
abstract type AbstractFactor end
7+
const FunctorInferenceType = AbstractFactor
8+
abstract type AbstractPackedFactor end
9+
const PackedInferenceType = AbstractPackedFactor
810

9-
abstract type AbstractPrior <: FunctorInferenceType end
10-
abstract type AbstractRelative <: FunctorInferenceType end
11+
abstract type AbstractPrior <: AbstractFactor end
12+
abstract type AbstractRelative <: AbstractFactor end
1113
abstract type AbstractRelativeRoots <: AbstractRelative end
1214
abstract type AbstractRelativeMinimize <: AbstractRelative end
1315

1416
# NOTE DF, Convolution is IIF idea, but DFG should know about "FactorOperationalMemory"
1517
# DF, IIF.CommonConvWrapper <: FactorOperationalMemory #
18+
# TODO resolve whether `<: Function` is really needed here
1619
abstract type FactorOperationalMemory <: Function end
1720
# TODO to be removed from DFG,
1821
# we can add to IIF or have IIF.CommonConvWrapper <: FactorOperationalMemory directly

0 commit comments

Comments
 (0)