pygraph.algorithms.critical

Package pygraph :: Package algorithms :: Module critical |

# Module critical

Critical path algorithms and transitivity detection algorithm.

Functions
List |
critical_path(graph) Compute and return the critical path in an acyclic directed weighted graph. |
List |
transitive_edges(graph) Return a list of transitive edges. |

Variables
| __package__ = ``'``pygraph.algorithms``'``

Function Details

### critical_path(graph) |
Compute and return the critical path in an acyclic directed weighted graph. Parameters: `graph` (digraph) - Digraph Returns: List List containing all the nodes in the path (or an empty array if the graph contains a cycle) Attention: This function is only meaningful for directed weighted acyclic graphs

### transitive_edges(graph) |
Return a list of transitive edges. Example of transitivity within graphs: A -> B, B -> C, A -> C in this case the transitive edge is: A -> C Parameters: `graph` (digraph) - Digraph Returns: List List containing tuples with transitive edges (or an empty array if the digraph contains a cycle) Attention: This function is only meaningful for directed acyclic graphs.