File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export getAdjacencyMatrixDataFrame
27
27
export getNeighbors
28
28
export getSubgraphAroundNode
29
29
export getSubgraph
30
- export isFullyConnected
30
+ export isFullyConnected, hasOrphans
31
31
32
32
mutable struct GraphsDFG <: AbstractDFG
33
33
g:: FGType
@@ -252,6 +252,9 @@ function isFullyConnected(dfg::GraphsDFG)::Bool
252
252
return length (connected_components (dfg. g)) == 1
253
253
end
254
254
255
+ # Alias
256
+ hasOrphans (dfg:: GraphsDFG ):: Bool = ! isFullyConnected (dfg)
257
+
255
258
"""
256
259
$(SIGNATURES)
257
260
Retrieve a list of labels of the immediate neighbors around a given variable or factor.
Original file line number Diff line number Diff line change 52
52
@testset " Connectivity Test" begin
53
53
global dfg,v1,v2,f1
54
54
@test isFullyConnected (dfg) == true
55
+ @test hasOrphans (dfg) == false
55
56
addVariable! (dfg, DFGVariable (:orphan ))
56
57
@test isFullyConnected (dfg) == false
58
+ @test hasOrphans (dfg) == true
57
59
end
58
60
59
61
# Adjacency matrices
You can’t perform that action at this time.
0 commit comments