Skip to content

Commit 1c85bb4

Browse files
committed
Fixed isFullyConnected
1 parent 255cc8b commit 1c85bb4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/CloudGraphsDFG/services/CloudGraphsDFG.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,11 @@ function isFullyConnected(dfg::CloudGraphsDFG)::Bool
337337
factIds = listFactors(dfg)
338338
length(varIds) + length(factIds) == 0 && return false
339339

340-
# Total connected nodes - thank you Neo4j for 0..* awesomeness!!
340+
# Total distinct connected nodes - thank you Neo4j for 0..* awesomeness!!
341+
# TODO: Deprecated matching technique and it's technically an expensive call - optimize.
341342
query = """
342343
match (n:$(dfg.userId):$(dfg.robotId):$(dfg.sessionId):$(varIds[1]))-[FACTORGRAPH*]-(node:$(dfg.userId):$(dfg.robotId):$(dfg.sessionId))
343-
WHERE (n:VARIABLE OR n:FACTOR OR node:VARIABLE OR node:FACTOR) and not (node:SESSION)
344+
WHERE (n:VARIABLE OR n:FACTOR OR node:VARIABLE OR node:FACTOR) and not (node:SESSION or n:SESSION) and not (n:PPE) and not (node:PPE)
344345
WITH collect(n)+collect(node) as nodelist
345346
unwind nodelist as nodes
346347
return count(distinct nodes)"""

0 commit comments

Comments
 (0)