Via - Category¶
proposed
Warning
Proposed functions for next mayor release.
They are not officially in the current release.
They will likely officially be part of the next mayor release:
The functions make use of ANY-INTEGER and ANY-NUMERICAL
Name might not change. (But still can)
Signature might not change. (But still can)
Functionality might not change. (But still can)
pgTap tests have being done. But might need more.
Documentation might need refinement.
General Information¶
This category intends to solve the general problem:
Given a graph and a list of vertices, find the shortest path between \(vertex_i\) and \(vertex_{i+1}\) for all vertices
In other words, find a continuos route that visits all the vertices in the order given.
- path:
represents a section of a route.
- route:
is a sequence of paths
Parameters¶
Used in:
Parameter |
Type |
Default |
Description |
---|---|---|---|
|
SQL query as described. |
||
via vertices |
|
Array of ordered vertices identifiers that are going to be visited. |
Where:
- ANY-INTEGER:
SMALLINT, INTEGER, BIGINT
Used in:
Parameter |
Type |
Default |
Description |
---|---|---|---|
|
SQL query as described. |
||
|
SQL query as described. |
||
via vertices |
|
Array of ordered vertices identifiers that are going to be visited.
|
Where:
- ANY-INTEGER:
SMALLINT, INTEGER, BIGINT
- ANY-NUMERICAL:
SMALLINT, INTEGER, BIGINT, REAL, FLOAT
Besides the compulsory parameters each function has, there are optional parameters that exist due to the kind of function.
Via optional parameters¶
Used in all Via functions
Parameter |
Type |
Default |
Description |
---|---|---|---|
|
|
|
|
|
|
|
|
Inner Queries¶
Depending on the function one or more inner queries are needed.
Edges SQL¶
Used in all Via functions
Column |
Type |
Default |
Description |
---|---|---|---|
|
ANY-INTEGER |
Identifier of the edge. |
|
|
ANY-INTEGER |
Identifier of the first end point vertex of the edge. |
|
|
ANY-INTEGER |
Identifier of the second end point vertex of the edge. |
|
|
ANY-NUMERICAL |
Weight of the edge ( |
|
|
ANY-NUMERICAL |
-1 |
Weight of the edge (
|
Where:
- ANY-INTEGER:
SMALLINT
,INTEGER
,BIGINT
- ANY-NUMERICAL:
SMALLINT
,INTEGER
,BIGINT
,REAL
,FLOAT
Restrictions SQL¶
Used in
Column |
Type |
Description |
---|---|---|
|
|
Sequence of edge identifiers that form a path that is not allowed to be
taken.
- Empty arrays or |
|
ANY-NUMERICAL |
Cost of taking the forbidden path. |
Where:
- ANY-INTEGER:
SMALLINT
,INTEGER
,BIGINT
- ANY-NUMERICAL:
SMALLINT
,INTEGER
,BIGINT
,REAL
,FLOAT
Points SQL¶
Used in
Parameter |
Type |
Default |
Description |
---|---|---|---|
|
ANY-INTEGER |
value |
Identifier of the point.
|
|
ANY-INTEGER |
Identifier of the “closest” edge to the point. |
|
|
ANY-NUMERICAL |
Value in <0,1> that indicates the relative postition from the first end point of the edge. |
|
|
|
|
Value in [
|
Where:
- ANY-INTEGER:
SMALLINT
,INTEGER
,BIGINT
- ANY-NUMERICAL:
SMALLINT
,INTEGER
,BIGINT
,REAL
,FLOAT
Result columns¶
Column |
Type |
Description |
---|---|---|
|
|
Sequential value starting from 1. |
|
|
Identifier of a path. Has value 1 for the first path. |
|
|
Relative position in the path. Has value 1 for the beginning of a path. |
|
|
Identifier of the starting vertex of the path. |
|
|
Identifier of the ending vertex of the path. |
|
|
Identifier of the node in the path from |
|
|
Identifier of the edge used to go from
|
|
|
Cost to traverse from |
|
|
Aggregate cost from |
|
|
Total cost from |
Note
When start_vid
, end_vid
and node
columns have negative values,
the identifier is for a Point.
See Also¶
Indices and tables