prg_djk_shortest_maximally_disjoint_cycle_compute()
Note: Requires OPNET Development Kit
Abstract
Finds two paths from a source to a destination that are as disjoint as possible.
Syntax
prg_djk_shortest_maximally_disjoint_cycle_compute (src_vertex_ptr, dest_vertex_ptr)
| Argument | Type | Description |
|---|---|---|
src_vertex_ptr |
PrgT_Graph_Vertex * |
The source vertex in the paths. |
dest_vertex_ptr |
PrgT_Graph_Vertex * |
The destination vertex in the paths. |
Return Type
PrgT_Vector *
Vector of two routes, where each route is a vector of PrgT_Graph_Edge*. The client owns the routes and should destroy the route vector using prg_vector_destroy (routes_vptr, 1). The two routes are from the source to destination and they form the "cycle".
Header
prg_djk.h
Details
This function is similar to prg_djk_shortest_edge_disjoint_cycle_compute() and prg_djk_shortest_vertex_disjoint_cycle_compute(); however, if a completely disjoint cycle cannot be found, it will try to find a cycle that is as disjoint as possible. This builds on the edge disjoint cycle by trying to find a cycle that is both edge and vertex disjoint. If there is a disjoint cycle, the shortest cycle is returned. If there is not a completely disjoint cycle, the most disjoint cycle is returned (the cycle with the fewest elements in common). The priority is edge disjoint. Vertex disjoint is second priority and cycle length is the third priority.
Note: The shortest cycle algorithms can be used only on undirected graphs (all edges are duplex).