[pgrouting-users] directed graphs?

Anton Patrushev anton at orkney.co.jp
Mon Aug 18 00:43:24 EDT 2008


It depends on your original data.

Graphs can be undirected, directed or directed with reverse cost.
In undirected graph cost value is used for both directions (from
source to target and from target to source).
In directed graph cost value is used for one direction (from source to
target), reverse direction is prohibited.
In directed graph with reverse cost reverse_cost value is used for
reverse direction (from target to source) and cost value is used for
normal direction (from source to target).

assign_vertex_id() doesn't change the original data. It just builds a
topology - assigns unique ids to unique nodes.

I don't know what kind of data you have. If it doesn't have any
reverse cost and it represents a road network there can be two
possibilities: it is undirected; or it is directed and has one
separate edges for both directions.

Anton.

On Mon, Aug 18, 2008 at 1:26 AM, Stephen Woodbridge
<woodbri at swoodbridge.com> wrote:
> How should the directed boolean be used?
>
> For example does function assign_vertex_id() build a directed or
> undirected graph?
>
> Does using a reverse_cost column imply a directed graph?
>
> I assume that if I use assign_vertex_id() to build my graphs, which
> appears to build undirected graphs, that I will set directed to false
> and that this option would only be used if I wrote my own function the
> specifically build directed graph.
>
> -Steve
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.postlbs.org
> http://lists.postlbs.org/mailman/listinfo/pgrouting-users
>



More information about the Pgrouting-users mailing list