-
Notifications
You must be signed in to change notification settings - Fork 4
Home
The names SimpleGraph
, SimpleDigraph
, and SimpleHypergraph
have changed.
- Instead of
SimpleGraph
, useUndirectedGraph
orUG
. - Instead of
SimpleDigraph
, useDirectedGraph
orDG
. - Instead of
SimpleHypergraph
, useHyperGraph
orHG
. Note the captialized G.
These changes were made to help this SimpleGraphs
module be interoperable with Julia's Graph
module which now uses the name SimpleGraph
(formerly LightGraph
).
The SimpleGraphs
module defines three data types:
-
UndirectedGraph
type represents undirected graphs without loops or multiple edges. This may be abbreviatedUG
. -
DirectedGraph
type represents directed graphs in which there may be at most one directed edge(u,v)
from a vertexu
to a vertexv
. This may be abbreviatedDG
. There may also be a directed edge in the opposite direction,(v,u)
. Loops are permitted. -
HyperGraph
type for hypergraphs. This may be abbreviatedHG
.
This User's Guide deals primarily with undirected graphs. Our support for directed graphs is modest, and support for hypergraphs is quite minimal.
Function descriptions in this User's Guide are terse. Use the Julia help function for more information. Type a ?
and then
the name of the function. For example:
help?> adjacency
search: adjacency
adjacency(G) returns the adjacency matrix of G.
Note: If the vertices can be sorted by sort, then the first row of the
adjacency matrix corresponds to the first vertex (in order) in G and so forth.
However, if the vertices are not sortable in this way, the mapping between
vertices and rows/columns of the matrix is unpredictable.
Additional graph theory functionality are provided in the following registered packages:
-
DrawSimpleGraphs
: draw graphs on the screen usingPlots
. -
SimpleGraphAlgorithms
: additional graph algorithms that typically rely on [integer] linear programming. -
ImplicitGraphs
: deal with graphs in which the vertices and edges are implicitly defined by two functions: one that tests for vertex membership and one that returns a list of the (out) neighbors of a vertex.
Users may also be interested in the following additional (and modestly maintained) graph theory modules available at my Github site:
SimplePlanarGraphs
SimpleGraphRepresentations
CoinRepresentations
WordGraphs
Mazes
SimplePosets
SimplePosetAlgorithms