Skip to content

Commit 68eacbb

Browse files
authored
Merge pull request #1053 from JuliaRobotics/master
v0.23.4-rc1
2 parents 57098f5 + cc7a05d commit 68eacbb

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DistributedFactorGraphs"
22
uuid = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
3-
version = "0.23.3"
3+
version = "0.23.4"
44

55
[deps]
66
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

src/DataBlobs/services/BlobEntry.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,18 @@ Notes:
195195
function deleteBlobEntry!(var::AbstractDFGVariable, key::Symbol)
196196
return pop!(var.dataDict, key)
197197
end
198+
199+
function deleteBlobEntry!(var::PackedVariable, key::Symbol)
200+
if !hasBlobEntry(var, key)
201+
throw(
202+
KeyError(
203+
"No dataEntry label $(key) found in variable $(getLabel(var)). Available keys: $(keys(var.dataDict))",
204+
),
205+
)
206+
end
207+
return deleteat!(var.blobEntries, findfirst(x -> x.label == key, var.blobEntries))
208+
end
209+
198210
function deleteBlobEntry!(dfg::AbstractDFG, label::Symbol, key::Symbol)
199211
#users responsibility to delete data in db before deleting entry
200212
# !isVariable(dfg, label) && return nothing

src/DistributedFactorGraphs.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ export copyGraph!, deepcopyGraph, deepcopyGraph!, buildSubgraph, mergeGraph!
233233

234234
export hasBlobEntry,
235235
getBlobEntry,
236+
getBlobEntryFirst,
236237
addBlobEntry!,
237238
updateBlobEntry!,
238239
deleteBlobEntry!,

src/GraphsDFG/services/GraphsDFG.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,12 @@ end
373373
function getBiadjacencyMatrix(
374374
dfg::GraphsDFG;
375375
solvable::Int = 0,
376+
varLabels = listVariables(dfg; solvable = solvable),
377+
factLabels = listFactors(dfg; solvable = solvable),
376378
)::NamedTuple{
377379
(:B, :varLabels, :facLabels),
378380
Tuple{Graphs.SparseMatrixCSC, Vector{Symbol}, Vector{Symbol}},
379381
}
380-
varLabels = listVariables(dfg; solvable = solvable)
381-
factLabels = listFactors(dfg; solvable = solvable)
382382
varIndex = [dfg.g.labels[s] for s in varLabels]
383383
factIndex = [dfg.g.labels[s] for s in factLabels]
384384

0 commit comments

Comments
 (0)