diff --git a/src/Deprecated.jl b/src/Deprecated.jl index a398daf1..af363c62 100644 --- a/src/Deprecated.jl +++ b/src/Deprecated.jl @@ -458,24 +458,3 @@ DFGSummary(args) = error("DFGSummary is deprecated") @deprecate getSummary(dfg::AbstractDFG) getSummaryGraph(dfg) @deprecate getKey(store::AbstractBlobstore) getLabel(store) - -##------------------------------------------------------------------------------ -## smallData -##------------------------------------------------------------------------------ -@deprecate getSmallData(args...) getMetadata(args...) -@deprecate setSmallData!(args...) setMetadata!(args...) -@deprecate addSmallData!(args...) addMetadata!(args...) -@deprecate updateSmallData!(args...) updateMetadata!(args...) -@deprecate deleteSmallData!(args...) deleteMetadata!(args...) -@deprecate listSmallData(args...) listMetadata(args...) -@deprecate emptySmallData!(args...) emptyMetadata!(args...) - -## ================================================================================ -## Deprecated in v0.24 -##================================================================================= -@deprecate getBlobEntry(var::AbstractDFGVariable, key::AbstractString) getBlobEntryFirst( - var, - Regex(key), -) - -@deprecate lsfWho(dfg::AbstractDFG, type::Symbol) lsf(dfg, getfield(Main, type)) diff --git a/src/entities/DFGFactor.jl b/src/entities/DFGFactor.jl index a97fdc1f..009d8bc3 100644 --- a/src/entities/DFGFactor.jl +++ b/src/entities/DFGFactor.jl @@ -64,7 +64,7 @@ Base.@kwdef struct FactorDFG <: AbstractDFGFactor nstime::String fnctype::String solvable::Int - data::Union{Nothing, String} = nothing #TODO deprecate data completely, left as a bridge to old serialization structure + data::Union{Nothing, String} = nothing #TODO v0.27 deprecate data completely, left as a bridge to old serialization structure metadata::String _version::String = string(_getDFGVersion()) state::FactorState @@ -119,7 +119,7 @@ function FactorDFG( nstime, fnctype, solvable, - nothing, #TODO deprecate data completely + nothing, #TODO v0.27 deprecate data completely metadata, _version, state, @@ -177,7 +177,7 @@ function FactorDFG( metadata = base64encode(JSON3.write(metadata)), state, observJSON = JSON3.write(fnc), - data = "", #TODO deprecate data completely + data = "", #TODO v0.27 deprecate data completely ) return factor diff --git a/src/entities/DFGVariable.jl b/src/entities/DFGVariable.jl index d4b457e0..eb0ba645 100644 --- a/src/entities/DFGVariable.jl +++ b/src/entities/DFGVariable.jl @@ -20,8 +20,6 @@ Fields: $(TYPEDFIELDS) """ Base.@kwdef mutable struct VariableState{T <: InferenceVariable, P, N} - "DEPRECATED remove in DFG v0.22" - variableType::T = T() #tricky deprecation, also change covar to using N and not variableType """ Globally unique identifier. """ @@ -36,11 +34,11 @@ Base.@kwdef mutable struct VariableState{T <: InferenceVariable, P, N} bw::Matrix{Float64} = zeros(0, 0) "Parametric (Gaussian) covariance." covar::Vector{SMatrix{N, N, Float64}} = - SMatrix{getDimension(variableType), getDimension(variableType), Float64}[] + SMatrix{getDimension(T), getDimension(T), Float64}[] BayesNetOutVertIDs::Vector{Symbol} = Symbol[] dimIDs::Vector{Int} = Int[] # TODO Likely deprecate - dims::Int = getDimension(variableType) #TODO should we deprecate in favor of N + dims::Int = getDimension(T) #TODO should we deprecate in favor of N """ Flag used by junction (Bayes) tree construction algorithm to know whether this variable has yet been included in the tree construction. """ @@ -54,7 +52,7 @@ Base.@kwdef mutable struct VariableState{T <: InferenceVariable, P, N} """ Stores the amount information (per measurement dimension) captured in each coordinate dimension. """ - infoPerCoord::Vector{Float64} = zeros(getDimension(variableType)) + infoPerCoord::Vector{Float64} = zeros(getDimension(T)) """ Should this variable solveKey be treated as marginalized in inference computations. """ diff --git a/src/services/AbstractDFG.jl b/src/services/AbstractDFG.jl index 95ceab0e..a7f13558 100644 --- a/src/services/AbstractDFG.jl +++ b/src/services/AbstractDFG.jl @@ -781,7 +781,7 @@ end $(SIGNATURES) Lists the factors of a specific type in the factor graph. Example, list all the Point2Point2 factors in the factor graph `dfg`: - lsfWho(dfg, :Point2Point2) + lsf(dfg, Point2Point2) Notes - Return `Vector{Symbol}` diff --git a/src/services/DFGVariable.jl b/src/services/DFGVariable.jl index 91f164f5..e8bb07fd 100644 --- a/src/services/DFGVariable.jl +++ b/src/services/DFGVariable.jl @@ -714,7 +714,8 @@ function copytoVariableState!( stateLabel::Symbol, state::VariableState, ) - newstate = VariableState(; + newstate = VariableState( + getVariableType(state); (k => getproperty(state, k) for k in fieldnames(VariableState))..., solveKey = stateLabel, ) diff --git a/src/services/Serialization.jl b/src/services/Serialization.jl index 988b93f4..3a2b3cce 100644 --- a/src/services/Serialization.jl +++ b/src/services/Serialization.jl @@ -242,7 +242,9 @@ function unpackVariable(variable::VariableDFG; skipVersionCheck::Bool = false) ppeDict = Dict{Symbol, MeanMaxPPE}(map(p -> p.solveKey, variable.ppes) .=> variable.ppes) - solverDict = Dict{Symbol, VariableState{variableType, pointType}}( + + N = getDimension(variableType) + solverDict = Dict{Symbol, VariableState{variableType, pointType, N}}( map(sd -> sd.solveKey, variable.solverData) .=> map(sd -> DFG.unpackVariableState(sd), variable.solverData), )