Graph Construction and Representations
Graphs and Components
Graph — a graph object
Edges, Vertices — list of edges and vertices in a graph
M, V — number of edges and vertices in a graph
Graph Representations
ToOrderedPairs — get a list of edges
ToAdjacencyLists — represent a graph as adjacency lists
ToAdjacencyMatrix — represent a graph as an adjacency matrix
ToUnorderedPairs ▪ FromOrderedPairs ▪ FromUnorderedPairs
FromAdjacencyLists ▪ FromAdjacencyMatrix ▪ IncidenceMatrix
SymmetricQ — test if a square matrix represents a symmetric relation
EquivalenceRelationQ — test if a matrix defines an equivalence relation
AntiSymmetricQ ▪ EquivalenceClasses ▪ Equivalences
Displaying Graphs »
ShowGraph — display a graph
ShowGraphArray — display several graphs
GraphOptions ▪ ShowLabeledGraph ▪ ...
Constructing Graphs »
MakeGraph — construct a graph using a binary predicate
RandomGraph — generate a random graph
GraphUnion — construct the union of two graphs
LineGraph ▪ AddEdges ▪ MakeUndirected ▪ PermuteSubgraph ▪ ...
SetEdgeWeights — assign weights to edges
SetVertexWeights — assign weights to vertices
GetEdgeWeights ▪ GetVertexWeights ▪ GetEdgeLabels ▪ GetVertexLabels
CostOfPath ▪ DilateVertices ▪ WeightingFunction ▪ WeightRange ▪ ...
Graph Input and Output
ReadGraph — read graph specification from a file
WriteGraph — write graph specification into a file
Built-in Graphs »
Cycle — a circular chain of edges
GridGraph — graph with nodes on a grid
FiniteGraphs — list of all built-in finite parameterless graphs
Wheel ▪ Hypercube ▪ Harary ▪ ...