Skip to content

Commit b279c7a

Browse files
committed
DFG[Variable/Factor] -> [Variable/Factor]Compute
1 parent b205f89 commit b279c7a

27 files changed

+108
-114
lines changed

IncrementalInference/ext/IncrInfrDiffEqFactorExt.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ DevNotes
5151
- TODO does not handle timezone crossing properly yet.
5252
"""
5353
function _calcTimespan(
54-
Xi::AbstractVector{<:DFGVariable}
54+
Xi::AbstractVector{<:VariableCompute}
5555
)
5656
#
5757
tsmps = getTimestamp.(Xi[1:2]) .|> DateTime .|> datetime2unix
@@ -60,13 +60,13 @@ function _calcTimespan(
6060
end
6161
# Notes
6262
# - Can change numerical data return type using an additional first argument, `_calcTimespan(Float32, Xi)`.
63-
# _calcTimespan(Xi::AbstractVector{<:DFGVariable}) = _calcTimespan(Float64, Xi)
63+
# _calcTimespan(Xi::AbstractVector{<:VariableCompute}) = _calcTimespan(Float64, Xi)
6464

6565
# performance helper function, FIXME not compatible with all multihypo cases
6666
_maketuplebeyond2args = (w1 = nothing, w2 = nothing, w3_...) -> (w3_...,)
6767

6868
function DERelative(
69-
Xi::AbstractVector{<:DFGVariable},
69+
Xi::AbstractVector{<:VariableCompute},
7070
domain::Type{<:VariableStateType},
7171
f::Function,
7272
data = () -> ();
@@ -97,7 +97,7 @@ function DERelative(
9797
domain::Type{<:VariableStateType},
9898
f::Function,
9999
data = () -> ();
100-
Xi::AbstractArray{<:DFGVariable} = getVariable.(dfg, labels),
100+
Xi::AbstractArray{<:VariableCompute} = getVariable.(dfg, labels),
101101
dt::Real = 1,
102102
state1::AbstractVector{<:Real} = allocate(getPointIdentity(domain)), #zeros(getDimension(domain)),
103103
state0::AbstractVector{<:Real} = allocate(getPointIdentity(domain)), #zeros(getDimension(domain)),

IncrementalInference/src/ExportAPI.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export AbstractDFG,
2828
addData!,
2929
addBlob!,
3030
getData,
31-
DFGVariable,
31+
VariableCompute,
3232
DFGVariableSummary,
33-
DFGFactor,
33+
FactorCompute,
3434
DFGFactorSummary,
3535
deleteVariableSolverData!
3636
# listDataBlobs # ERROR: LightDFG{} doesn't override 'listDataBlobs'.

IncrementalInference/src/IncrementalInference.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ import DistributedFactorGraphs: compare
7979
import DistributedFactorGraphs: rebuildFactorCache!
8080
import DistributedFactorGraphs: getDimension, getManifold, getPointType, getPointIdentity
8181
import DistributedFactorGraphs: getPPE, getPPEDict
82-
import DistributedFactorGraphs: getFactorOperationalMemoryType
8382
import DistributedFactorGraphs: getPoint, getCoordinates
8483
import DistributedFactorGraphs: getVariableType
8584
import DistributedFactorGraphs: AbstractPointParametricEst, loadDFG

IncrementalInference/src/Serialization/services/DispatchPackedConversions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ Dev Notes:
9494
- TODO: needs testing
9595
"""
9696
function DFG.rebuildFactorCache!(
97-
dfg::AbstractDFG{SolverParams},
98-
factor::DFGFactor,
97+
dfg::AbstractDFG,
98+
factor::FactorCompute,
9999
neighbors = map(vId -> getVariable(dfg, vId), listNeighbors(dfg, factor));
100100
_blockRecursionGradients::Bool=false
101101
)

IncrementalInference/src/entities/BeliefTypes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function TreeBelief(vnd::VariableNodeData, solvDim::Real = 0)
8686
)
8787
end
8888

89-
function TreeBelief(vari::DFGVariable, solveKey::Symbol = :default; solvableDim::Real = 0)
89+
function TreeBelief(vari::VariableCompute, solveKey::Symbol = :default; solvableDim::Real = 0)
9090
return TreeBelief(getVariableState(vari, solveKey), solvableDim)
9191
end
9292
#

IncrementalInference/src/entities/CalcFactor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct CalcFactorNormSq{
5454
## TODO Consolidation WIP with FactorMetadata
5555
# full list of variables connected to the factor
5656
# TODO make sure this list is of the active hypo only
57-
fullvariables::VT # Vector{<:DFGVariable} # FIXME change to tuple for better type stability
57+
fullvariables::VT # Vector{<:VariableCompute} # FIXME change to tuple for better type stability
5858
# which index is being solved for?
5959
solvefor::Int
6060
manifold::M

IncrementalInference/src/entities/FactorGradients.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Related
5959
[`calcFactorResidualTemporary`](@ref), [`_buildGraphByFactorAndTypes`](@ref)
6060
"""
6161
mutable struct FactorGradientsCached!{F <: AbstractRelative, S, M, P, G, L}
62-
dfgfct::DFGFactor{F}
62+
dfgfct::FactorCompute{F}
6363
# cached jacobian matrix of gradients
6464
cached_gradients::Matrix{Float64}
6565
# likely <:AbstractVector, while CalcFactor residuals are vectors in Rn but could change to Tangent vectors

IncrementalInference/src/parametric/services/ConsolidateParametricRelatives.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Related: [`getMeasurementParametric`](@ref), [`approxConvBelief`](@ref), [`Mutab
2020
"""
2121
function solveFactorParametric(
2222
dfg::AbstractDFG,
23-
fct::DFGFactor,
23+
fct::FactorCompute,
2424
# currval::P1,
2525
srcsym_vals::AbstractVector{Pair{Symbol, P}},
2626
trgsym::Symbol;
@@ -44,7 +44,7 @@ function solveFactorParametric(
4444
measT = [mea_]
4545

4646
# get variable points
47-
function _getParametric(vari::DFGVariable, key = :default)
47+
function _getParametric(vari::VariableCompute, key = :default)
4848
# hasp = haskey(getPPEDict(vari), key)
4949
# FIXME use PPE via Manifold points currently in coordinates
5050
# hasp ? getPPE(vari, key).suggested : calcMean(getBelief(vari, key))

IncrementalInference/src/parametric/services/ParametricCSMFunctions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function solveUp_ParametricStateMachine(csmc::CliqStateMachineContainer)
1212
# csmc.drawtree ? drawTree(csmc.tree, show=false, filepath=joinpath(getSolverParams(csmc.dfg).logpath,"bt.pdf")) : nothing
1313

1414
#TODO maybe change to symbols
15-
msgfcts = DFGFactor[]
15+
msgfcts = FactorCompute[]
1616
# LITTLE WEIRD get previously set up msgs (stored in this clique)
1717
# FIXME, fetch message buffered in channels
1818
# see #855

IncrementalInference/src/parametric/services/ParametricManopt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818

1919
function CalcFactorResidual(
2020
fg,
21-
fct::DFGFactor,
21+
fct::FactorCompute,
2222
varIntLabel
2323
)
2424
fac_func = getFactorType(fct)
@@ -520,7 +520,7 @@ end
520520

521521
function autoinitParametric!(
522522
dfg::AbstractDFG,
523-
xi::DFGVariable;
523+
xi::VariableCompute;
524524
solveKey = :parametric,
525525
reinit::Bool = false,
526526
perturb_point::Bool=false,

0 commit comments

Comments
 (0)