# Graph and Network Algorithms

Directed and undirected graphs, network analysis

Graphs model the connections in a network and are widely applicable to a variety of physical, biological, and information systems. You can use graphs to model the neurons in a brain, the flight patterns of an airline, and much more. The structure of a graph is comprised of “nodes” and “edges”. Each node represents an entity, and each edge represents a connection between two nodes. For more information, see Directed and Undirected Graphs.

## Fonctions

développer tout

 `graph` Graph with undirected edges `digraph` Graph with directed edges
 `addnode` Add new node to graph `rmnode` Remove node from graph `addedge` Add new edge to graph `rmedge` Remove edge from graph `flipedge` Reverse edge directions `numnodes` Number of nodes in graph `numedges` Number of edges in graph `findnode` Locate node in graph `findedge` Locate edge in graph `edgecount` Number of edges between two nodes `reordernodes` Reorder graph nodes `subgraph` Extract subgraph
 `centrality` Measure node importance `conncomp` Connected graph components `biconncomp` Biconnected graph components `condensation` Graph condensation `bctree` Block-cut tree graph `toposort` Topological order of directed acyclic graph `isdag` Determine if graph is acyclic `transreduction` Transitive reduction `transclosure` Transitive closure `isisomorphic` Determine whether two graphs are isomorphic `isomorphism` Compute isomorphism between two graphs `ismultigraph` Determine whether graph has multiple edges `simplify` Reduce multigraph to simple graph
 `bfsearch` Breadth-first graph search `dfsearch` Depth-first graph search `shortestpath` Shortest path between two single nodes `shortestpathtree` Shortest path tree from node `distances` Shortest path distances of all node pairs `allpaths` Find all paths between two graph nodes (depuis R2021a) `maxflow` Maximum flow in graph `minspantree` Minimum spanning tree of graph `hascycles` Determine whether graph contains cycles (depuis R2021a) `allcycles` Find all cycles in graph (depuis R2021a) `cyclebasis` Fundamental cycle basis of graph (depuis R2021a)
 `adjacency` Graph adjacency matrix `incidence` Graph incidence matrix `laplacian` Graph Laplacian matrix
 `degree` Degree of graph nodes `neighbors` Neighbors of graph node `nearest` Nearest neighbors within radius `indegree` In-degree of nodes `outdegree` Out-degree of nodes `predecessors` Node predecessors `successors` Node successors `inedges` Incoming edges to node `outedges` Outgoing edges from node
 `plot` Plot graph nodes and edges `labeledge` Label graph edges `labelnode` Label graph nodes `layout` Change layout of graph plot `highlight` Highlight nodes and edges in plotted graph

## Objets

 `GraphPlot` Graph plot for directed and undirected graphs

## Propriétés

 GraphPlot Properties Graph plot appearance and behavior