Macaulay2 » Documentation
Packages » Graphs :: deleteVertices
next | previous | forward | backward | up | index | toc

deleteVertices -- Deletes specified vertices from a digraph or graph

Synopsis

Description

Removes specified list of vertices and their incident edges from a graph or digraph.

i1 : G = graph({1,2,3,4,5},{{1,3},{3,4},{4,5}});
i2 : L = {1,2};
i3 : deleteVertices(G,L)

o3 = Graph{3 => {4}   }
           4 => {3, 5}
           5 => {4}

o3 : Graph

See also

Ways to use deleteVertices :

For the programmer

The object deleteVertices is a method function.