Skip to content

Commit fde1bf6

Browse files
authored
Merge pull request #422 from JuliaRobotics/maint/20Q2/convobj
step to rename FactorOperationalMemory
2 parents d904b30 + a0c46ca commit fde1bf6

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

src/DistributedFactorGraphs.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export addBigDataEntry!, addDataEntry!, getBigDataEntry, updateBigDataEntry!, de
173173
##------------------------------------------------------------------------------
174174
# Factor Data
175175
export GenericFunctionNodeData
176-
export InferenceType, PackedInferenceType, FunctorInferenceType, ConvolutionObject
176+
export InferenceType, PackedInferenceType, FunctorInferenceType, FactorOperationalMemory
177177
export FunctorSingleton, FunctorPairwise, FunctorPairwiseMinimize
178178

179179
# accessors
@@ -225,7 +225,8 @@ export
225225

226226

227227
## Deprecated exports should be listed in Deprecated.jl if possible, otherwise here
228-
228+
#TODO remove export in DFG v0.8.0
229+
export ConvolutionObject
229230

230231
## needsahome.jl
231232
import Base: print

src/entities/DFGFactor.jl

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ abstract type PackedInferenceType end
77

88
abstract type FunctorInferenceType <: Function end
99

10-
# DF suggestion1 (this is a first guess) `ConvolutionObject` --> `FactorInsituObject`
11-
# DF second guess, ConvolutionObject <: FactorInsituObject
12-
# JT Maybe second guess as intermediate step where ConvolutionObject is moved to IIF.
13-
# then it can be removed to CommonConvWrapper <: FactorInsituObject
14-
15-
# DF, Convolution is IIF idea, but DFG should know about "FactorOperationalMemory"
16-
# DF, IIF.CommonConvWrapper <: FactorOperationalMemory # FIXME
17-
# MAYBE rename "FactorOperationalMemory"
18-
abstract type ConvolutionObject <: Function end
10+
# NOTE DF, Convolution is IIF idea, but DFG should know about "FactorOperationalMemory"
11+
# DF, IIF.CommonConvWrapper <: FactorOperationalMemory #
12+
abstract type FactorOperationalMemory <: Function end
13+
# TODO to be removed from DFG,
14+
# we can add to IIF or have IIF.CommonConvWrapper <: FactorOperationalMemory directly
15+
abstract type ConvolutionObject <: FactorOperationalMemory end
1916

2017
abstract type FunctorSingleton <: FunctorInferenceType end
2118
abstract type FunctorPairwise <: FunctorInferenceType end
@@ -37,7 +34,7 @@ Designing (WIP)
3734
# in IIF.FunctorPairwiseMinimize <: InferenceType # DFG whatever, something, we'll figure it out
3835
# in Main/User, SomeFactor <: FunctorPairwiseMinimize
3936
"""
40-
mutable struct GenericFunctionNodeData{T, S} #{T<:Union{PackedInferenceType, FunctorInferenceType, ConvolutionObject}, S<:Union{Symbol, AbstractString}}
37+
mutable struct GenericFunctionNodeData{T, S} #{T<:Union{PackedInferenceType, FunctorInferenceType, FactorOperationalMemory}, S<:Union{Symbol, AbstractString}}
4138
fncargvID::Vector{Symbol}
4239
eliminated::Bool
4340
potentialused::Bool
@@ -62,7 +59,7 @@ end
6259
const PackedFunctionNodeData{T} = GenericFunctionNodeData{T, <: AbstractString}
6360
PackedFunctionNodeData(x1, x2, x3, x4, x5::S, x6::T, multihypo::Vector{Float64}=[], certainhypo::Vector{Int}=Int[], x9::Int=0) where {T <: PackedInferenceType, S <: AbstractString} = GenericFunctionNodeData(x1, x2, x3, x4, x5, x6, multihypo, certainhypo, x9)
6461
const FunctionNodeData{T} = GenericFunctionNodeData{T, Symbol}
65-
FunctionNodeData(x1, x2, x3, x4, x5::Symbol, x6::T, multihypo::Vector{Float64}=[], certainhypo::Vector{Int}=Int[], x9::Int=0) where {T <: Union{FunctorInferenceType, ConvolutionObject}}= GenericFunctionNodeData{T, Symbol}(x1, x2, x3, x4, x5, x6, multihypo, certainhypo, x9)
62+
FunctionNodeData(x1, x2, x3, x4, x5::Symbol, x6::T, multihypo::Vector{Float64}=[], certainhypo::Vector{Int}=Int[], x9::Int=0) where {T <: Union{FunctorInferenceType, FactorOperationalMemory}}= GenericFunctionNodeData{T, Symbol}(x1, x2, x3, x4, x5, x6, multihypo, certainhypo, x9)
6663

6764
##==============================================================================
6865
## Factors
@@ -104,7 +101,7 @@ mutable struct DFGFactor{T, S} <: AbstractDFGFactor
104101
"""Mutable parameters for the variable. We suggest using accessors to get to this data.
105102
Accessors: [`getSolvable`](@ref), [`setSolvable!`](@ref)"""
106103
_dfgNodeParams::DFGNodeParams
107-
"""Internal cache of the ordering of the neighbor variables. Rather use getNeighbors to get the list as this is an internal value.
104+
"""Internal cache of the ordering of the neighbor variables. Rather use getVariableOrder to get the list as this is an internal value.
108105
Accessors: [`getVariableOrder`](@ref)"""
109106
_variableOrderSymbols::Vector{Symbol}
110107
end

src/services/CompareUtils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ implement compare if needed.
1212
=#
1313
==(a::InferenceVariable,b::InferenceVariable) = typeof(a) == typeof(b) && a.dims == b.dims && a.manifolds == b.manifolds
1414

15-
==(a::ConvolutionObject, b::ConvolutionObject) = typeof(a) == typeof(b)
15+
==(a::FactorOperationalMemory, b::FactorOperationalMemory) = typeof(a) == typeof(b)
1616

1717
==(a::FunctorInferenceType, b::FunctorInferenceType) = typeof(a) == typeof(b)
1818

test/testBlocks.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function Base.convert(::Type{TestFunctorSingleton}, d::PackedTestFunctorSingleto
5656
TestFunctorSingleton()
5757
end
5858

59-
struct TestCCW{T} <: ConvolutionObject where {T<:FunctorInferenceType}
59+
struct TestCCW{T} <: FactorOperationalMemory where {T<:FunctorInferenceType}
6060
usrfnc!::T
6161
end
6262
Base.:(==)(a::TestCCW, b::TestCCW) = a.usrfnc! == b.usrfnc!
@@ -76,7 +76,7 @@ function Base.convert(::Type{DFG.FunctionNodeData{TestCCW{F}}},
7676
d.solveInProgress)
7777
end
7878

79-
function Base.convert(::Type{DFG.PackedFunctionNodeData{P}}, d::DFG.FunctionNodeData{<:ConvolutionObject}) where P <: PackedInferenceType
79+
function Base.convert(::Type{DFG.PackedFunctionNodeData{P}}, d::DFG.FunctionNodeData{<:FactorOperationalMemory}) where P <: PackedInferenceType
8080
# mhstr = packmultihypo(d.fnc) # this is where certainhypo error occurs
8181
return DFG.PackedFunctionNodeData(d.fncargvID,
8282
d.eliminated,

0 commit comments

Comments
 (0)