VertexOutComponent
VertexOutComponent[g,{v1,v2,…}]
gives the vertices in the graph g that have a directed path from at least one of v1, v2, ….
VertexOutComponent[g,{v1,v2,…},k]
gives the vertices with a directed path from at least one of v1, v2, … of at most length k.
VertexOutComponent[g,{v1,v2,…},{k}]
gives the vertices at length exactly k.
VertexOutComponent[{vw,…},…]
uses rules vw to specify the graph g.
Details
- VertexOutComponent works for any directed graph object.
- VertexOutComponent works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open allclose allScope (8)
VertexOutComponent works with undirected graphs:
Use rules to specify the graph:
Use patterns to select a subset of vertices:
Find the out-component connected to a vertex by a path of at most length 2 in a graph:
VertexOutComponent works with large graphs:
Properties & Relations (1)
Use VertexInComponent to find the in-component for directed graphs:
Text
Wolfram Research (2010), VertexOutComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexOutComponent.html (updated 2020).
CMS
Wolfram Language. 2010. "VertexOutComponent." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/VertexOutComponent.html.
APA
Wolfram Language. (2010). VertexOutComponent. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexOutComponent.html