Skip to content

Commit 0d9640a

Browse files
committed
more
1 parent db0c0db commit 0d9640a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/GraphsDFG/services/GraphsDFG.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,14 @@ end
281281
$(SIGNATURES)
282282
Retrieve a list of labels of the immediate neighbors around a given variable or factor.
283283
"""
284-
function getNeighbors(dfg::GraphsDFG, node::T; ready::Union{Nothing, Int}=nothing, backendset::Union{Nothing, Int}=nothing)::Vector{Symbol} where T <: DFGNode
284+
function getNeighbors(dfg::GraphsDFG, node::T; solvable::Union{Nothing, Int}=nothing, backendset::Union{Nothing, Int}=nothing)::Vector{Symbol} where T <: DFGNode
285285
if !haskey(dfg.labelDict, node.label)
286286
error("Variable/factor with label '$(node.label)' does not exist in the factor graph")
287287
end
288288
vert = dfg.g.vertices[dfg.labelDict[node.label]]
289289
neighbors = in_neighbors(vert, dfg.g) #Don't use out_neighbors! It enforces directiveness even if we don't want it
290290
# Additional filtering
291-
neighbors = ready != nothing ? filter(v -> isSolvable(v.dfgNode) >= ready, neighbors) : neighbors
291+
neighbors = ready != nothing ? filter(v -> solvable <= isSolvable(v.dfgNode), neighbors) : neighbors
292292
neighbors = backendset != nothing ? filter(v -> isSolveInProgress(v.dfgNode) == backendset, neighbors) : neighbors
293293
# Variable sorting (order is important)
294294
if node isa DFGFactor

src/services/AbstractDFG.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ function getAdjacencyMatrix(dfg::G)::Matrix{Union{Nothing, Symbol}} where G <: A
482482
adjMat[2:end, 1] = factLabels
483483
adjMat[1, 2:end] = varLabels
484484
for (fIndex, factLabel) in enumerate(factLabels)
485-
factVars = getNeighbors(dfg, getFactor(dfg, factLabel))
485+
factVars = getNeighbors(dfg, getFactor(dfg, factLabel), solvable=solvable)
486486
map(vLabel -> adjMat[fIndex+1,vDict[vLabel]] = factLabel, factVars)
487487
end
488488
return adjMat

0 commit comments

Comments
 (0)