Mathematics > Graph and Network Algorithms

54 functions in MATLAB › Mathematics > Graph and Network Algorithms.

addedgeAdds edges to a graph or digraph, creating new nodes if needed.
addnodeAdds nodes to a graph or digraph.
adjacencyAdjacency matrix of a graph.
allcyclesFinds every simple cycle of a graph or digraph.
allpathsFinds every simple path between two nodes.
bctreeBlock-cut tree of an undirected graph.
bfsearchBreadth-first search: nodes in order of discovery by distance in edges.
biconncompBiconnected components (blocks) of an undirected graph.
centralityImportance score of each node, by one of several measures.
condensationCondensation of a digraph: each strongly connected component becomes one node.
conncompConnected components of a graph or digraph.
cyclebasisA set of independent cycles from which all cycles of a graph can be built.
degreeNumber of edges at each node of a graph.
dfsearchDepth-first search: nodes in the order a depth-first traversal discovers them.
digraphCreates a directed graph from edges or an adjacency matrix.
distancesShortest-path distances between nodes.
edgecountNumber of edges between two nodes of a multigraph.
findedgeIndex of the edge between two nodes.
findnodeIndex of a node given its name.
flipedgeReverses the direction of edges in a digraph.
graphCreates an undirected graph from edges or an adjacency matrix.
hascyclesTests whether a graph or digraph contains a cycle.
highlightColors chosen nodes or edges of a graph plot.
incidenceIncidence matrix: which edges touch which nodes.
indegreeNumber of edges entering each node of a digraph.
inedgesIndices of the edges entering a node.
isdagTests whether a digraph is a directed acyclic graph.
isisomorphicTests whether two graphs have the same structure.
ismultigraphTests whether a graph has parallel edges.
isomorphismFinds a node mapping that makes two graphs identical.
labeledgeAdds labels to the edges of a graph plot.
labelnodeAdds labels to the nodes of a graph plot.
laplacianLaplacian matrix of a graph.
layoutChanges how a graph plot places its nodes.
maxflowMaximum flow through a network from a source to a sink.
minspantreeMinimum spanning tree of a weighted graph.
nearestNodes within a given distance of a node.
neighborsNodes directly connected to a node.
numedgesNumber of edges in a graph.
numnodesNumber of nodes in a graph.
outdegreeNumber of edges leaving each node of a digraph.
outedgesIndices of the edges leaving a node.
predecessorsNodes that have an edge into a given node of a digraph.
reordernodesRenumbers the nodes of a graph.
rmedgeRemoves edges from a graph or digraph.
rmnodeRemoves nodes, and the edges at them, from a graph or digraph.
shortestpathShortest path between two nodes.
shortestpathtreeTree of shortest paths from one source node.
simplifyCollapses parallel edges and removes self-loops of a graph.
subgraphExtracts the graph induced by a set of nodes.
successorsNodes that a given node of a digraph points to.
toposortTopological order of the nodes of a directed acyclic graph.
transclosureTransitive closure of a directed graph.
transreductionTransitive reduction of a directed acyclic graph.