Graph Programming

By providing a completely extensible set of vertex and edge properties, you can make graphs represent much more than the structural information embodied in their topology. For instance, vertices could contain dynamic system models and edges could contain signals, and the graph could then represent a block-diagram model. The vertex and edge properties can also be used to store the state when scanning the graph in a depth-first or breadth-first manner as used by many graph algorithms. But Mathematica provides a multi-paradigm approach to graph programming with a rich set of matrix, optimization, and Boolean-based frameworks that allow for a variety of extensions to the whole graph framework.

ReferenceReference

Manipulating Vertex and Edge Properties

Property property wrapper for vertices and edges

Properties option for graphs to specify vertex and edge properties

PropertyList give a list of available properties

PropertyValue get and set vertex or edge property values

SetProperty ▪ RemoveProperty

Scan-Based Algorithms

BreadthFirstScan scan a graph in a breadth-first order

DepthFirstScan scan a graph in a depth-first order

 ▪  ▪  ▪  ▪  ▪  ▪  ▪

Matrix-Based Algorithms »

AdjacencyMatrix convert to a sparse adjacency matrix representation

AdjacencyGraph construct a graph from an adjacency matrix

IncidenceMatrix ▪ IncidenceGraph ▪ KirchhoffMatrix ▪ KirchhoffGraph

Transpose ▪ Dot ▪ Eigenvalues ▪ Eigenvectors ▪ ...

Optimization-Based Algorithms »

Minimize minimize a function with constraints

NMinimize ▪ FindMinimum ▪ LinearProgramming ▪ ...

Boolean Function-Based Algorithms »

SatisfiableQ test whether a Boolean formula or function can be True

TautologyQ ▪ Conjunction ▪ Disjunction ▪ ...

New to Mathematica? Find your learning path »
Have a question? Ask support »