Help Center> Graph Engine Service> User Guide> Algorithms> All Shortest Paths of Vertex Sets
Updated on 2022-09-15 GMT+08:00

All Shortest Paths of Vertex Sets

Overview

The Shortest Path of Vertex Sets algorithm finds the shortest path between vertex sets.

Application Scenarios

This algorithm can be used to analyze relationships between blocks in scenarios such as Internet social networking, financial risk control, road network traffic, and logistics delivery.

Parameter Description

Table 1 All Shortest Paths of Vertex Sets algorithm parameters

Parameter

Mandatory

Description

Type

Value Range

Default Value

sources

Yes

Source vertex ID set

String

The value is in the standard CSV format. IDs are separated by commas (,), for example, Alice, Nana.

The maximum ID number is 100,000.

-

targets

Yes

Target vertex ID set

String

The value is in the standard CSV format. IDs are separated by commas (,), for example, Alice, Nana.

The maximum ID number is 100,000.

-

directed

No

Whether to consider the edge direction

Boolean

true or false. It is a Boolean value.

false

Precautions

If a vertex ID contains commas (,), add double quotation marks to it. For example, when Paris, je taime and Alice IDs are used as sources, the ID set is "Paris, je taime",Alice".

Example

Set parameters directed to true, sources to "Alice,Nana", and targets to "Lily,Amy". The JSON result is displayed in the query result area.