Skip to content

Commit e1d0482

Browse files
vnickolovMats-SX
andcommitted
Minor code re-formatting to shrink the table widths
Co-authored-by: Mats Rydberg <[email protected]>
1 parent 698fe57 commit e1d0482

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

doc/asciidoc/migration/migration-triangle-count.adoc

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,14 @@ YIELD nodeId, triangles, coefficient
8989
----
9090
CALL gds.triangleCount.mutate('myGraph', {mutateProperty: 'tc'})
9191
YIELD globalTriangleCount
92-
CALL gds.localClusteringCoefficient.stream('myGraph', {triangleCountProperty: 'tc'})
93-
YIELD nodeId, localClusteringCoefficient
94-
WITH nodeId, localClusteringCoefficient, gds.util.nodeProperty('myGraph', nodeId, 'tc') AS triangleCount
92+
CALL gds.localClusteringCoefficient.stream(
93+
'myGraph', {
94+
triangleCountProperty: 'tc'
95+
}) YIELD nodeId, localClusteringCoefficient
96+
WITH
97+
nodeId,
98+
localClusteringCoefficient,
99+
gds.util.nodeProperty('myGraph', nodeId, 'tc') AS triangleCount
95100
RETURN nodeId, triangleCount, localClusteringCoefficient
96101
----
97102

@@ -109,7 +114,11 @@ CALL algo.triangleCount.stream(
109114
----
110115
CALL gds.triangleCount.stream({
111116
nodeProjection: 'MyLabel',
112-
relationshipProjection: { MY_RELATIONSHIP_TYPE: { orientation: 'UNDIRECTED' } }
117+
relationshipProjection: {
118+
MY_RELATIONSHIP_TYPE: {
119+
orientation: 'UNDIRECTED'
120+
}
121+
}
113122
})
114123
----
115124
|===
@@ -132,8 +141,9 @@ CALL algo.triangleCount(null, null, {
132141
|
133142
[source, cypher]
134143
----
135-
CALL gds.triangleCount.write('myGraph', {writeProperty: 'tc'})
136-
YIELD nodeCount, globalTriangleCount
144+
CALL gds.triangleCount.write('myGraph', {
145+
writeProperty: 'tc'
146+
}) YIELD nodeCount, globalTriangleCount
137147
----
138148

139149
2+| Writing local clustering coefficients from named graph:
@@ -149,8 +159,9 @@ CALL algo.triangleCount(null, null, {
149159
|
150160
[source, cypher]
151161
----
152-
CALL gds.localClusteringCoefficient.write('myGraph', {writeProperty: 'lcc'})
153-
YIELD nodeCount, averageClusteringCoefficient
162+
CALL gds.localClusteringCoefficient.write('myGraph', {
163+
writeProperty: 'lcc'
164+
}) YIELD nodeCount, averageClusteringCoefficient
154165
----
155166

156167
2+| Writing both triangle counts and local clustering coefficients:
@@ -171,7 +182,8 @@ CALL gds.triangleCount.mutate('myGraph', {
171182
mutateProperty: 'tc'
172183
}) YIELD globalTriangleCount
173184
CALL gds.localClusteringCoefficient.write('myGraph', {
174-
triangleCountProperty: 'tc', writeProperty: 'lcc'
185+
triangleCountProperty: 'tc',
186+
writeProperty: 'lcc'
175187
}) YIELD nodeCount, averageClusteringCoefficient
176188
CALL gds.graph.writeNodeProperties('myGraph', ['tc'])
177189
YIELD propertiesWritten

0 commit comments

Comments
 (0)