IndexGraph
IndexGraph[g]
replaces the vertices of the graph g by its vertex indices.
IndexGraph[g,r]
replaces the vertices with integers r, r+1, ….
IndexGraph[{vw,…},…]
uses rules vw to specify the graph g.
Details and Options
- IndexGraph works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open allclose allBasic Examples (2)
Scope (7)
IndexGraph works with undirected graphs:
Replace the vertices with negative indices:
Use rules to specify the graph:
IndexGraph works with large graphs:
Properties & Relations (5)
IndexGraph has the same number of vertices as the original graph:
IndexGraph has the same number of edges as the original graph:
IndexGraph is isomorphic to the original graph:
Use VertexReplace to replace the vertices of the graph:
IndexGraph has the same adjacency matrix as the original graph:
Text
Wolfram Research (2010), IndexGraph, Wolfram Language function, https://reference.wolfram.com/language/ref/IndexGraph.html (updated 2015).
CMS
Wolfram Language. 2010. "IndexGraph." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/IndexGraph.html.
APA
Wolfram Language. (2010). IndexGraph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IndexGraph.html