Skip to content

Commit fe16ef4

Browse files
author
Mark Needham
committed
union find
1 parent 56328ea commit fe16ef4

File tree

4 files changed

+634
-64
lines changed

4 files changed

+634
-64
lines changed

generate_notebooks.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ python generate_notebook.py \
2626
"https://github.com/neo4j-contrib/neo4j-graph-algorithms/raw/3.2/doc/asciidoc/connected-components.adoc" \
2727
"https://github.com/neo4j-contrib/neo4j-graph-algorithms/raw/3.2/doc/asciidoc/scripts/connected-components.cypher" \
2828
"unweighted-stream-sample-graph" \
29-
"unweighted-stream-sample-graph-explanation"
29+
"unweighted-stream-sample-graph-explanation" \
30+
"unweighted-write-sample-graph"
3031

3132
python generate_notebook.py \
3233
"Weighted Connected Components" \
3334
"https://github.com/neo4j-contrib/neo4j-graph-algorithms/raw/3.2/doc/asciidoc/connected-components.adoc" \
3435
"https://github.com/neo4j-contrib/neo4j-graph-algorithms/raw/3.2/doc/asciidoc/scripts/connected-components.cypher" \
3536
"weighted-stream-sample-graph" \
36-
"weighted-stream-sample-graph-explanation"
37+
"weighted-stream-sample-graph-explanation" \
38+
"weighted-write-sample-graph"
3739

3840
python generate_notebook.py \
3941
"Strongly Connected Components" \

notebooks/UnweightedConnectedComponents.ipynb

Lines changed: 302 additions & 33 deletions
Large diffs are not rendered by default.

notebooks/WeightedConnectedComponents.ipynb

Lines changed: 298 additions & 29 deletions
Large diffs are not rendered by default.

notebooks/scripts/algo.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,36 @@ def viz_config(algorithm_name):
7878
'caption': False
7979
}
8080
}
81+
},
82+
"Unweighted Connected Components": {
83+
"query": "MATCH (p1:User)-[r:FRIEND]->(p2:User) RETURN *",
84+
"labels_json": {
85+
'User': {
86+
'caption': 'id',
87+
'community': 'partition'
88+
}
89+
},
90+
"relationships_json": {
91+
'FRIEND': {
92+
'thickness': 'weight',
93+
'caption': False
94+
}
95+
}
96+
},
97+
"Weighted Connected Components": {
98+
"query": "MATCH (p1:User)-[r:FRIEND]->(p2:User) RETURN *",
99+
"labels_json": {
100+
'User': {
101+
'caption': 'id',
102+
'community': 'partition'
103+
}
104+
},
105+
"relationships_json": {
106+
'FRIEND': {
107+
'thickness': 'weight',
108+
'caption': False
109+
}
110+
}
81111
}
82112
}[algorithm_name]
83113

0 commit comments

Comments
 (0)