@@ -89,9 +89,14 @@ YIELD nodeId, triangles, coefficient
89
89
----
90
90
CALL gds.triangleCount.mutate('myGraph', {mutateProperty: 'tc'})
91
91
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
95
100
RETURN nodeId, triangleCount, localClusteringCoefficient
96
101
----
97
102
@@ -109,7 +114,11 @@ CALL algo.triangleCount.stream(
109
114
----
110
115
CALL gds.triangleCount.stream({
111
116
nodeProjection: 'MyLabel',
112
- relationshipProjection: { MY_RELATIONSHIP_TYPE: { orientation: 'UNDIRECTED' } }
117
+ relationshipProjection: {
118
+ MY_RELATIONSHIP_TYPE: {
119
+ orientation: 'UNDIRECTED'
120
+ }
121
+ }
113
122
})
114
123
----
115
124
|===
@@ -132,8 +141,9 @@ CALL algo.triangleCount(null, null, {
132
141
|
133
142
[source, cypher]
134
143
----
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
137
147
----
138
148
139
149
2+| Writing local clustering coefficients from named graph:
@@ -149,8 +159,9 @@ CALL algo.triangleCount(null, null, {
149
159
|
150
160
[source, cypher]
151
161
----
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
154
165
----
155
166
156
167
2+| Writing both triangle counts and local clustering coefficients:
@@ -171,7 +182,8 @@ CALL gds.triangleCount.mutate('myGraph', {
171
182
mutateProperty: 'tc'
172
183
}) YIELD globalTriangleCount
173
184
CALL gds.localClusteringCoefficient.write('myGraph', {
174
- triangleCountProperty: 'tc', writeProperty: 'lcc'
185
+ triangleCountProperty: 'tc',
186
+ writeProperty: 'lcc'
175
187
}) YIELD nodeCount, averageClusteringCoefficient
176
188
CALL gds.graph.writeNodeProperties('myGraph', ['tc'])
177
189
YIELD propertiesWritten
0 commit comments