Data::Hopen::OrderedPredecessorGraph - Graph that tracks the order in which edges are added
Just like a Graph with two exceptions:
Every call to "add_edge" (or other edge-adding routines) tracks the order in an attribute on that edge; and
New routine "ordered_predecessors" returns the predecessors sorted in the order they were added.
This is unlike "predecessors" in Graph and "edges_to" in Graph, which return the predecessors in random order.
Add an edge. Exactly as "add_edge" in Graph except that it also creates the new edge attribute to hold the order. Returns the graph.
"add_edges" in Graph is implemented using add_edge, so we don't need to override add_edges.
add_edge
add_edges
Return a list of the predecessors of the given vertex, in order that the edges were added to that vertex. Exactly as "predecessors" in Graph except for the stable order.
Add a multiedge. Exactly as "add_edge_by_id" in Graph except that it also creates the new edge attribute to hold the order. Returns the graph. Can only be used on a multiedged graph.
Add a multiedge. Exactly as "add_edge_get_id" in Graph except that it also creates the new edge attribute to hold the order. Returns the ID of the new edge. Can only be used on a multiedged graph.
To install Data::Hopen, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Hopen
CPAN shell
perl -MCPAN -e shell install Data::Hopen
For more information on module installation, please visit the detailed CPAN module installation guide.