You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/services/AbstractDFG.jl
+30-2Lines changed: 30 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -426,8 +426,36 @@ Optionally provide an existing subgraph addToDFG, the extracted nodes will be co
426
426
Note: By default orphaned factors (where the subgraph does not contain all the related variables) are not returned. Set includeOrphanFactors to return the orphans irrespective of whether the subgraph contains all the variables.
427
427
Note: Always returns the node at the center, but filters around it if solvable is set.
428
428
"""
429
-
functiongetSubgraphAroundNode(dfg::G, node::T, distance::Int64=1, includeOrphanFactors::Bool=false, addToDFG::H=_getDuplicatedEmptyDFG(dfg); solvable::Int=0)::Gwhere {G <:AbstractDFG, H <:AbstractDFG, P <:AbstractParams, T <:DFGNode}
430
-
error("getSubgraphAroundNode not implemented for $(typeof(dfg))")
429
+
functiongetSubgraphAroundNode(dfg::G, node::T, distance::Int64=1, includeOrphanFactors::Bool=false, addToDFG::H=_getDuplicatedEmptyDFG(dfg); solvable::Int=0)::Hwhere {G <:AbstractDFG, H <:AbstractDFG, P <:AbstractParams, T <:DFGNode}
430
+
# error("getSubgraphAroundNode not implemented for $(typeof(dfg))")
431
+
if!exists(dfg, node.label)
432
+
error("Variable/factor with label '$(node.label)' does not exist in the factor graph")
433
+
end
434
+
435
+
# Build a list of all unique neighbors inside 'distance'
0 commit comments