Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/Deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
6 changes: 3 additions & 3 deletions src/entities/DFGFactor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -119,7 +119,7 @@ function FactorDFG(
nstime,
fnctype,
solvable,
nothing, #TODO deprecate data completely
nothing, #TODO v0.27 deprecate data completely
metadata,
_version,
state,
Expand Down Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions src/entities/DFGVariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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.
"""
Expand All @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/services/AbstractDFG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
3 changes: 2 additions & 1 deletion src/services/DFGVariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
4 changes: 3 additions & 1 deletion src/services/Serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down
Loading