<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>DirectedGraph -- a class for directed graphs</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_directed__Graph.html">next</a> | <a href="___Directed__Edges.html">previous</a> | <a href="_directed__Graph.html">forward</a> | <a href="___Directed__Edges.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>DirectedGraph -- a class for directed graphs</h1> <div class="single"><h2>Description</h2> <div><div>This class is a type of HashTable which represents directed graphs. It consists of a vertex set and a set of sequences (a,b) representing a directed edge from a to b.</div> <table class="examples"><tr><td><pre>i1 : V = {a,b,c,d,e}; -- the vertex set</pre> </td></tr> <tr><td><pre>i2 : E = {(a,b),(b,c),(a,c),(a,d),(d,e)}; -- directed edges; (a,b) means a directed edge from a to b.</pre> </td></tr> <tr><td><pre>i3 : G = directedGraph(V,E) o3 = DirectedGraph{cache => CacheTable } DirectedEdges => {(a, b), (b, c), (a, c), (a, d), (d, e)} Vertices => {a, b, c, d, e} o3 : DirectedGraph</pre> </td></tr> <tr><td><pre>i4 : allPairsShortestPath(G) o4 = | 0 1 1 1 2 | | infinity 0 1 infinity infinity | | infinity infinity 0 infinity infinity | | infinity infinity infinity 0 1 | | infinity infinity infinity infinity 0 | 5 5 o4 : Matrix RR <--- RR 53 53</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_directed__Graph.html" title="creating a directed graph">directedGraph</a> -- creating a directed graph</span></li> <li><span><a href="___Vertices.html" title="the set of vertices a directed graph">Vertices</a> -- the set of vertices a directed graph</span></li> <li><span><a href="___Directed__Edges.html" title="the set of directed edges of a directed graph">DirectedEdges</a> -- the set of directed edges of a directed graph</span></li> <li><span><a href="_adjacency__Matrix.html" title="returns adjacency matrix of a directed graph">adjacencyMatrix</a> -- returns adjacency matrix of a directed graph</span></li> <li><span><a href="_all__Pairs__Shortest__Path.html" title="computes lengths of shortest paths between all pairs in a directed graph">allPairsShortestPath</a> -- computes lengths of shortest paths between all pairs in a directed graph</span></li> </ul> </div> <div class="waystouse"><h2>Methods that use an object of class DirectedGraph :</h2> <ul><li><span>adjacencyMatrix(DirectedGraph), see <span><a href="_adjacency__Matrix.html" title="returns adjacency matrix of a directed graph">adjacencyMatrix</a> -- returns adjacency matrix of a directed graph</span></span></li> <li><span>allPairsShortestPath(DirectedGraph), see <span><a href="_all__Pairs__Shortest__Path.html" title="computes lengths of shortest paths between all pairs in a directed graph">allPairsShortestPath</a> -- computes lengths of shortest paths between all pairs in a directed graph</span></span></li> </ul> </div> <div class="waystouse"><h2>For the programmer</h2> <p>The object <a href="___Directed__Graph.html" title="a class for directed graphs">DirectedGraph</a> is <span>a <a href="../../Macaulay2Doc/html/___Type.html">type</a></span>, with ancestor classes <a href="../../Macaulay2Doc/html/___Hash__Table.html" title="the class of all hash tables">HashTable</a> < <a href="../../Macaulay2Doc/html/___Thing.html" title="the class of all things">Thing</a>.</p> </div> </div> </body> </html>