Updated on 2022-02-22 GMT+08:00

Shortest Path of Vertex Sets

Overview

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

Application Scenarios

This algorithm applies to block relationship analysis in Internet social networking, financial risk control, road network transportation, and logistics delivery scenarios.

Parameter Description

Table 1 Shortest Path 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

Bool

true or false

false

timeWindow

No

Time window used for time filtering

Json

For details, see Table 2.

-

Table 2 timeWindow parameters

Parameter

Mandatory

Description

Type

Value Range

Default Value

filterName

No

Name of the time attribute used for time filtering

String

Character string: The attribute on the corresponding vertex/edge is used as the time.

-

filterType

No

Filtering by vertex or edge

String

V: Filtering by vertex

E: Filtering by edge

BOTH: Filtering by vertex and edge

BOTH

startTime

No

Start time

String

Date character string or timestamp

-

endTime

No

End time

String

Date character string or timestamp

-

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.