Graphs are first-class citizens in
Mathematica, and can be used as input, output, in programs, and in documents. Undirected and directed graphs are treated uniformly and support a number of standard properties for vertices and edges. Importantly, graphs also support custom properties for modeling or computational flexibility. Graphs can be converted to a number of different representations, including matrices. Graphs can be exported with high-fidelity to numerous file formats.
Graph — represent a general graph, or create it from vertices and edges
VertexCount,
EdgeCount — the number of vertices and edges in the graph
VertexList,
EdgeList — the list of vertices and edges in the graph
VertexIndex,
EdgeIndex — the index for a vertex or edge in a graph
EdgeRules — the list of edges as a list of rules
Property — property wrapper for vertices and edges
PropertyValue — get and set vertex or edge property values
AdjacencyMatrix — vertex-vertex adjacency matrix
Export — export graphs into several graph formats