Skip to content

Commit 6da156d

Browse files
committed
Towards Standard Variables
1 parent b59f877 commit 6da156d

16 files changed

Lines changed: 127 additions & 734 deletions

src/Common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ end
143143
## Validation of session, robot, and user labels.
144144
##==============================================================================
145145
global _invalidIds =
146-
["GRAPH", "AGENT", "VARIABLE", "FACTOR", "PPE", "BLOB_ENTRY", "FACTORGRAPH"]
146+
["GRAPH", "AGENT", "VARIABLE", "FACTOR", "BLOB_ENTRY", "FACTORGRAPH"]
147147

148148
const global _validLabelRegex::Regex = r"^[a-zA-Z][-\w\.\@]*$"
149149

src/Deprecated.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ function getSolveInProgress(
5252
)
5353
# Variable
5454
if var isa VariableCompute
55-
if haskey(getSolverDataDict(var), solveKey)
56-
return getSolverDataDict(var)[solveKey].solveInProgress
55+
if haskey(refStates(var), solveKey)
56+
return refStates(var)[solveKey].solveInProgress
5757
else
5858
return 0
5959
end
@@ -148,6 +148,9 @@ function _getDuplicatedEmptyDFG(
148148
# DFG.setDescription!(newDfg, "(Copy of) $(DFG.getDescription(dfg))")
149149
return newDfg
150150
end
151+
152+
#TODO is Type correct
153+
@deprecate getVariableType(args...) getStateType(args...)
151154
## ================================================================================
152155
## Deprecated in v0.28
153156
##=================================================================================
@@ -289,7 +292,7 @@ end
289292

290293
# Related
291294

292-
# [`listSolveKeys`](@ref), [`getSolverDataDict`](@ref), [`listVariables`](@ref)
295+
# [`listSolveKeys`](@ref), [`refStates`](@ref), [`listVariables`](@ref)
293296
# """
294297
function listSolveKeys(
295298
variable::VariableCompute,
@@ -298,7 +301,7 @@ function listSolveKeys(
298301
)
299302
Base.depwarn("listSolveKeys is deprecated, use listStates instead.", :listSolveKeys)
300303
#
301-
for ky in keys(getSolverDataDict(variable))
304+
for ky in keys(refStates(variable))
302305
push!(skeys, ky)
303306
end
304307

@@ -328,7 +331,7 @@ function listSolveKeys(
328331
#
329332
skeys = Set{Symbol}()
330333
varList = listVariables(dfg, filterVariables; tags = tags, solvable = solvable)
331-
for vs in varList #, ky in keys(getSolverDataDict(getVariable(dfg, vs)))
334+
for vs in varList #, ky in keys(refStates(getVariable(dfg, vs)))
332335
listSolveKeys(dfg, vs, filterSolveKeys, skeys)
333336
end
334337

src/DistributedFactorGraphs.jl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ const unstable_functions::Vector{Symbol} = [
379379
:getVariableLabelNumber,# TODO somewhat used, do we deprecate?
380380
:getfirstBlobentry,# TODO somewhat used, do we deprecate?
381381
:getSolveInProgress,#TODO unused, do we deprecate?
382-
:getSolverDataDict,## TODO deprecated or obsolete
383382
:hasTagsNeighbors,
384383
:isVariable,
385384
:isFactor,
@@ -433,6 +432,7 @@ const unstable_functions::Vector{Symbol} = [
433432
:setMetadata!, # no set, use add merge
434433
:setAgentMetadata!,
435434
:setGraphMetadata!,
435+
# :getSolverDataDict,# obsolete
436436

437437
#Deprecated in v0.28
438438
:AbstractRelativeMinimize,
@@ -469,24 +469,24 @@ const unstable_functions::Vector{Symbol} = [
469469
:PackedFactor,
470470
:Factor,
471471
:AbstractPointParametricEst,
472-
:MeanMaxPPE,
473-
:getPPEMax,
474-
:getPPEMean,
475-
:getPPESuggested,
476-
:getLastUpdatedTimestamp,
477-
:getPPEDict,
478-
:getVariablePPEDict,
479-
:getVariablePPE,
472+
# :MeanMaxPPE,
473+
# :getPPEMax,
474+
# :getPPEMean,
475+
# :getPPESuggested,
476+
# :getLastUpdatedTimestamp,
477+
# :getPPEDict,
478+
# :getVariablePPEDict,
479+
# :getVariablePPE,
480480
:listSolveKeys,
481481
:listSupersolves,
482-
:getPPE,
483-
:getPPEs,
484-
:getVariablePPE,
485-
:addPPE!,
486-
:updatePPE!,
487-
:deletePPE!,
488-
:listPPEs,
489-
:mergePPEs!,
482+
# :getPPE,
483+
# :getPPEs,
484+
# :getVariablePPE,
485+
# :addPPE!,
486+
# :updatePPE!,
487+
# :deletePPE!,
488+
# :listPPEs,
489+
# :mergePPEs!,
490490
Symbol("@defVariable"),
491491
:SmallDataTypes,
492492
:NoSolverParams,

src/entities/DFGFactor.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const FactorCache = AbstractFactorCache #
3131
eliminated::Bool = false # TODO should eliminated and potentialused be moved outside of FactorState?
3232
potentialused::Bool = false # TODO ^
3333
multihypo::Vector{Float64} = Float64[] # TODO re-evaluate after refactoring w #477
34-
certainhypo::Vector{Int} = Int[]
34+
certainhypo::Vector{Int} = Int[] #TODO mihgt be dead code?
3535
nullhypo::Float64 = 0.0
3636
# solveInProgress::Int = 0 #TODO maybe deprecated or move to operational memory, also why Int?
3737
inflation::Float64 = 0.0

0 commit comments

Comments
 (0)