195195 $(SIGNATURES)
196196Delete a referenced DFGVariable from the DFG.
197197"""
198- deleteVariable! (dfg:: GraphsDFG , variable:: DFGVariable ):: DFGVariable = deleteVariable (dfg, variable. label)
198+ deleteVariable! (dfg:: GraphsDFG , variable:: DFGVariable ):: DFGVariable = deleteVariable! (dfg, variable. label)
199199
200200"""
201201 $(SIGNATURES)
@@ -224,7 +224,7 @@ List the DFGVariables in the DFG.
224224Optionally specify a label regular expression to retrieves a subset of the variables.
225225"""
226226function getVariables (dfg:: GraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ; tags:: Vector{Symbol} = Symbol[]):: Vector{DFGVariable}
227- variables = map (v -> v. dfgNode, filter (n -> n. dfgNode isa DFGVariable, vertices (dfg. g)))
227+ variables = map (v -> v. dfgNode, filter (n -> n. dfgNode isa DFGVariable, Graphs . vertices (dfg. g)))
228228 if regexFilter != nothing
229229 variables = filter (v -> occursin (regexFilter, String (v. label)), variables)
230230 end
@@ -269,7 +269,7 @@ List the DFGFactors in the DFG.
269269Optionally specify a label regular expression to retrieves a subset of the factors.
270270"""
271271function getFactors (dfg:: GraphsDFG , regexFilter:: Union{Nothing, Regex} = nothing ):: Vector{DFGFactor}
272- factors = map (v -> v. dfgNode, filter (n -> n. dfgNode isa DFGFactor, vertices (dfg. g)))
272+ factors = map (v -> v. dfgNode, filter (n -> n. dfgNode isa DFGFactor, Graphs . vertices (dfg. g)))
273273 if regexFilter != nothing
274274 factors = filter (f -> occursin (regexFilter, String (f. label)), factors)
275275 end
304304Checks if the graph is fully connected, returns true if so.
305305"""
306306function isFullyConnected (dfg:: GraphsDFG ):: Bool
307- return length (connected_components (dfg. g)) == 1
307+ return length (Graphs . connected_components (dfg. g)) == 1
308308end
309309
310310# Alias
@@ -326,8 +326,8 @@ function getNeighbors(dfg::GraphsDFG, node::T; ready::Union{Nothing, Int}=nothin
326326 vert = dfg. g. vertices[dfg. labelDict[node. label]]
327327 neighbors = in_neighbors (vert, dfg. g) # Don't use out_neighbors! It enforces directiveness even if we don't want it
328328 # Additional filtering
329- neighbors = ready != nothing ? filter (v -> v. ready == ready, neighbors) : neighbors
330- neighbors = backendset != nothing ? filter (v -> v. backendset == backendset, neighbors) : neighbors
329+ neighbors = ready != nothing ? filter (v -> v. dfgNode . ready == ready, neighbors) : neighbors
330+ neighbors = backendset != nothing ? filter (v -> v. dfgNode . backendset == backendset, neighbors) : neighbors
331331 # Variable sorting (order is important)
332332 if node isa DFGFactor
333333 order = intersect (node. _variableOrderSymbols, map (v-> v. dfgNode. label, neighbors))
@@ -347,8 +347,8 @@ function getNeighbors(dfg::GraphsDFG, label::Symbol; ready::Union{Nothing, Int}=
347347 vert = dfg. g. vertices[dfg. labelDict[label]]
348348 neighbors = in_neighbors (vert, dfg. g) # Don't use out_neighbors! It enforces directiveness even if we don't want it
349349 # Additional filtering
350- neighbors = ready != nothing ? filter (v -> v. ready == ready, neighbors) : neighbors
351- neighbors = backendset != nothing ? filter (v -> v. backendset == backendset, neighbors) : neighbors
350+ neighbors = ready != nothing ? filter (v -> v. dfgNode . ready == ready, neighbors) : neighbors
351+ neighbors = backendset != nothing ? filter (v -> v. dfgNode . backendset == backendset, neighbors) : neighbors
352352 # Variable sorting when using a factor (function order is important)
353353 if vert. dfgNode isa DFGFactor
354354 vert. dfgNode. _variableOrderSymbols
@@ -451,7 +451,7 @@ Get a deep subgraph copy from the DFG given a list of variables and factors.
451451Optionally provide an existing subgraph addToDFG, the extracted nodes will be copied into this graph. By default a new subgraph will be created.
452452Note: 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.
453453"""
454- function getSubgraph (dfg:: GraphsDFG , variableFactorLabels:: Vector{Symbol} , includeOrphanFactors:: Bool = false , addToDFG:: GraphsDFG = GraphsDFG ()):: GraphsDFG
454+ function getSubgraph (dfg:: GraphsDFG , variableFactorLabels:: Vector{Symbol} , includeOrphanFactors:: Bool = false , addToDFG:: GraphsDFG = GraphsDFG {AbstractParams} ()):: GraphsDFG
455455 for label in variableFactorLabels
456456 if ! haskey (dfg. labelDict, label)
457457 error (" Variable/factor with label '$(label) ' does not exist in the factor graph" )
0 commit comments