Skip to content

Commit f0ff4cc

Browse files
committed
Fix docs
1 parent f7a9dbf commit f0ff4cc

File tree

1 file changed

+33
-41
lines changed

1 file changed

+33
-41
lines changed

doc/modules/ROOT/pages/algorithms/all-pairs-shortest-path.adoc

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
:page-aliases: algorithms/all-pairs-shortest-path.adoc
2-
31
[[algorithm-all-pairs-shortest-path]]
42
= All Pairs Shortest Path
53
:description: This section describes the All Pairs Shortest Path algorithm in the Neo4j Graph Data Science library.
@@ -77,45 +75,6 @@ include::partial$/algorithms/common-configuration/common-stream-stats-configurat
7775
7876
======
7977

80-
[.include-with-estimate]
81-
======
82-
.The following will estimate the memory requirements for running the algorithm:
83-
[source, cypher, role=noplay]
84-
----
85-
CALL gds.allShortestPaths.stream.estimate(
86-
graphNameOrConfiguration: string or map,
87-
configuration: map
88-
)
89-
YIELD nodeCount, relationshipCount, bytesMin, bytesMax, requiredMemory
90-
----
91-
92-
include::partial$/algorithms/common-configuration/common-parameters.adoc[]
93-
94-
.Configuration
95-
[opts="header",cols="3,2,3m,2,8"]
96-
|===
97-
| Name | Type | Default | Optional | Description
98-
include::partial$/algorithms/common-configuration/common-estimate-configuration-entries.adoc[]
99-
| xref:common-usage/running-algos.adoc#common-configuration-relationship-weight-property[relationshipWeightProperty] | String | null | yes | Name of the relationship property to use as weights. If unspecified, the algorithm runs unweighted.
100-
|===
101-
102-
.Results
103-
[opts="header",cols="1,1,6"]
104-
|===
105-
| Name | Type | Description
106-
| nodeCount | Integer | The number of nodes in the graph.
107-
| relationshipCount | Integer | The number of relationships in the graph.
108-
| requiredMemory | String | An estimation of the required memory in a human readable format.
109-
| treeView | String | A more detailed representation of the required memory, including estimates of the different components in human readable format.
110-
| mapView | Map | A more detailed representation of the required memory, including estimates of the different components in structured format.
111-
| bytesMin | Integer | The minimum number of bytes required.
112-
| bytesMax | Integer | The maximum number of bytes required.
113-
| heapPercentageMin | Float | The minimum percentage of the configured maximum heap required.
114-
| heapPercentageMax | Float | The maximum percentage of the configured maximum heap required.
115-
|===
116-
117-
======
118-
11978
[[algorithm-all-pairs-shortest-path-sample]]
12079
== All Pairs Shortest Path algorithm sample
12180

@@ -158,6 +117,39 @@ RETURN gds.graph.project(
158117
)
159118
----
160119

120+
[[algorithm-all-pairs-shortest-path-examples-memory-estimation]]
121+
=== Memory Estimation
122+
123+
:mode: stream
124+
include::partial$/algorithms/shared/examples-estimate-intro.adoc[]
125+
126+
[role=query-example]
127+
--
128+
.The following will estimate the memory requirements for running the algorithm:
129+
[source, cypher, role=noplay]
130+
----
131+
CALL gds.allShortestPaths.stream.estimate('cypherGraph', {
132+
relationshipWeightProperty: 'cost'
133+
})
134+
YIELD nodeCount, relationshipCount, bytesMin, bytesMax, requiredMemory
135+
RETURN nodeCount, relationshipCount, bytesMin, bytesMax, requiredMemory
136+
----
137+
138+
.Results
139+
[opts="header"]
140+
|===
141+
| nodeCount | relationshipCount | bytesMin | bytesMax | requiredMemory
142+
| 6 | 18 | 1264 | 1264 | "1264 Bytes"
143+
|===
144+
--
145+
146+
[[algorithm-all-pairs-shortest-path-examples-stream]]
147+
=== Stream
148+
149+
:!stream-details:
150+
In the `stream` execution mode, the algorithm returns the shortest path distance for each source-target pair.
151+
This allows us to inspect the results directly or post-process them in Cypher without any side effects.
152+
161153
[role=query-example]
162154
--
163155
.The following will run the algorithm, treating the graph as undirected:

0 commit comments

Comments
 (0)