Skip to content

Commit 54a50e2

Browse files
authored
Merge branch 'master' into 23Q3/maint/bump_dfg_v0.23
2 parents 71845e8 + dd4b679 commit 54a50e2

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/Serialization/services/DispatchPackedConversions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function convert(
1212
d.edgeIDs,
1313
convert(P, _getCCW(d).usrfnc!),
1414
d.multihypo,
15-
_getCCW(d).certainhypo,
15+
_getCCW(d).hyporecipe.certainhypo,
1616
d.nullhypo,
1717
d.solveInProgress,
1818
d.inflation,
@@ -92,7 +92,7 @@ Dev Notes:
9292
function rebuildFactorMetadata!(
9393
dfg::AbstractDFG{SolverParams},
9494
factor::DFGFactor,
95-
neighbors = map(vId -> getVariable(dfg, vId), getNeighbors(dfg, factor));
95+
neighbors = map(vId -> getVariable(dfg, vId), listNeighbors(dfg, factor));
9696
_blockRecursionGradients::Bool=false
9797
)
9898
#

src/services/BayesNet.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ function rmVarFromMarg(dfg::AbstractDFG, fromvert::DFGVariable, gm::Vector{DFGFa
102102
@debug " - Removing $(fromvert.label)"
103103
for m in gm
104104
@debug "Looking at $(m.label)"
105-
for n in DFG.getNeighbors(dfg, m) #x1, x2
106-
if n == fromvert.label # n.label ==? x1
105+
for n in listNeighbors(dfg, m) #x1, x2
106+
if n == getLabel(fromvert) # n.label ==? x1
107107
@debug " - Breaking link $(m.label)->$(fromvert.label)..."
108108
@debug " - Original links: $(DFG.ls(dfg, m))"
109109
remvars = setdiff(DFG.ls(dfg, m), [fromvert.label])
@@ -125,7 +125,7 @@ function rmVarFromMarg(dfg::AbstractDFG, fromvert::DFGVariable, gm::Vector{DFGFa
125125
end
126126
end
127127
# Added back in chain rule.
128-
if DFG.exists(dfg, m) && length(DFG.getNeighbors(dfg, m)) <= 1
128+
if DFG.exists(dfg, m) && length(listNeighbors(dfg, m)) <= 1
129129
@warn "removing vertex id=$(m.label)"
130130
DFG.deleteFactor!(dfg, m)
131131
end
@@ -149,11 +149,11 @@ function buildBayesNet!(dfg::AbstractDFG, elimorder::Vector{Symbol}; solvable::I
149149
gm = DFGFactor[]
150150

151151
vert = DFG.getVariable(dfg, v)
152-
for fctId in DFG.getNeighbors(dfg, vert; solvable = solvable)
152+
for fctId in listNeighbors(dfg, vert; solvable = solvable)
153153
fct = DFG.getFactor(dfg, fctId)
154154
if (getSolverData(fct).eliminated != true)
155155
push!(fi, fctId)
156-
for sepNode in DFG.getNeighbors(dfg, fct; solvable = solvable)
156+
for sepNode in listNeighbors(dfg, fct; solvable = solvable)
157157
# TODO -- validate !(sepNode.index in Si) vs. older !(sepNode in Si)
158158
if sepNode != v && !(sepNode in Si) # Symbol comparison!
159159
push!(Si, sepNode)

src/services/FGOSUtils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ function getFactorsAmongVariablesOnly(
516516
# Select factors that have all variables in this clique var list
517517
usefcts = Symbol[]
518518
for fct in almostfcts
519-
if length(setdiff(DFG.getNeighbors(dfg, fct), varlist)) == 0
519+
if length(setdiff(listNeighbors(dfg, fct), varlist)) == 0
520520
push!(usefcts, fct)
521521
end
522522
end

src/services/GraphInit.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function factorCanInitFromOtherVars(
6666
)
6767
#
6868
# all variables attached to this factor
69-
varsyms = DFG.getNeighbors(dfg, fct)
69+
varsyms = listNeighbors(dfg, fct)
7070

7171
# which element is being solved for
7272
sfidx = (1:length(varsyms))[varsyms .== loovar][1]
@@ -145,7 +145,7 @@ function doautoinit!(
145145
end
146146
# get factors attached to this variable xi
147147
vsym = xi.label
148-
neinodes = DFG.getNeighbors(dfg, vsym)
148+
neinodes = listNeighbors(dfg, vsym)
149149
# proceed if has more than one neighbor OR even if single factor
150150
if (singles || length(neinodes) > 1)
151151
# Which of the factors can be used for initialization

src/services/GraphProductOperations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function propagateBelief(
1818
destvar::DFGVariable,
1919
factors::AbstractVector; #{<:DFGFactor};
2020
solveKey::Symbol = :default,
21-
dens::AbstractVector{<:ManifoldKernelDensity} = Vector{ManifoldKernelDensity}(), # TODO, abstract is unstable
21+
dens::AbstractVector{<:ManifoldKernelDensity} = Vector{ManifoldKernelDensity}(), # TODO, abstract requires dynamic dispatch (slow)
2222
N::Integer = getSolverParams(dfg).N,
2323
needFreshMeasurements::Bool = true,
2424
dbg::Bool = false,
@@ -75,7 +75,7 @@ function propagateBelief(
7575
end
7676
#
7777

78-
propagateBelief(dfg::AbstractDFG, destlbl::Symbol, ::Colon; kw...) = propagateBelief(dfg, destlbl, getNeighbors(dfg, destlbl); kw...)
78+
propagateBelief(dfg::AbstractDFG, destlbl::Symbol, ::Colon; kw...) = propagateBelief(dfg, destlbl, listNeighbors(dfg, destlbl); kw...)
7979

8080

8181

@@ -97,7 +97,7 @@ function localProduct(
9797
)
9898
#
9999
# vector of all neighbors as Symbols
100-
lb = getNeighbors(dfg, sym)
100+
lb = listNeighbors(dfg, sym)
101101

102102
# store proposal beliefs, TODO replace Abstract with concrete type
103103
dens = Vector{ManifoldKernelDensity}()

src/services/SubGraphFunctions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function buildCliqSubgraph!(
3030
#todo replace with the factor list (potentials) from the clique
3131
addfac = Symbol[]
3232
for sym in frontals
33-
union!(addfac, getNeighbors(dfg, sym))
33+
union!(addfac, listNeighbors(dfg, sym))
3434
end
3535

3636
allfacs = Symbol[]

0 commit comments

Comments
 (0)