Graphs are first-class citizens in the Wolfram Language 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.
Graphs can be constructed in a variety of ways. They can be built from vertices and edges directly in a symbolic form. They can come from built-in curated collections of theoretical or empirical graphs. Special graphs can be generated from parametric specifications. Random graphs following a variety of graph distributions allow you to build simulated internets or citation graphs and test algorithms. Graphs can be fully specified by several types of matrices, or they can be imported from numerous supported file formats. Graphs can also be constructed in several steps by performing operations on graphs.
Graph — represent a general graph, or create it from vertices and edges
UndirectedEdge — an undirected edge ()
DirectedEdge — a directed edge ()
PropertyValue — get and set vertex or edge property values
GraphData — collection of theoretical graphs
ExampleData — collection of empirical graphs
SocialMediaData — graph data from social sites (Facebook, Twitter, …)
CompleteGraph — generate a complete or a complete -partite graph
ButterflyGraph ▪ CirculantGraph ▪ CompleteKaryTree ▪ CycleGraph ▪ DeBruijnGraph ▪ GridGraph ▪ HararyGraph ▪ HypercubeGraph ▪ KaryTree ▪ KnightTourGraph ▪ PathGraph ▪ PetersenGraph ▪ StarGraph ▪ TreeGraph ▪ TuranGraph ▪ WheelGraph
RelationGraph — generate a graph based on data and a relation
NearestNeighborGraph — generate the k-nearest neighbor graph for general elements
NestGraph — generate a nested function graph
RandomGraph — generate random graphs following a graph distribution
Subgraph — extract subgraphs