Warning
These are proposed functions for next mayor release.
Traveling Sales Person - Family of functions needs as input a symmetric cost matrix and no edge (u, v) must value \(\infty\).
This collection of functions will return a cost matrix in form of a table.
The main Characteristics are:
Can be used as input to pgr_TSP.
directly: | when the resulting matrix is symmetric and there is no \(\infty\) value. |
---|
It will be the users responsibility to make the matrix symmetric.
It is also the users responsibility to fix an \(\infty\) value.
Each function works as part of the family it belongs to.
It does not return a path.
Returns the sum of the costs of the shortest path for pair combination of nodes in the graph.
Process is done only on edges with positive costs.
Values are returned when there is a path.
Let be the case the values returned are stored in a table, so the unique index would be the pair: (start_vid, end_vid).
Depending on the function and its parameters, the results can be symmetric.
Any duplicated value in the start_vids are ignored.
The returned values are ordered:
Running time: approximately \(O(| start\_vids | * (V \log V + E))\)