Darwin Help

Back to Index

InduceGraph

Function InduceGraph


Calling Sequence  InduceGraph(G,V)
InduceGraph(G,E)
Parameters
NameTypeDescription

G Grapha given Graph
V NodesNodes to be removed
E EdgesEdges to be removed
Return Type  Graph
Synopsis This function removes a set of either edges or vertices from a graph and returns the updated graph. Note that the deletion of an edge does not remove the vertex end points of this edge. The deletion of a vertex removes all incident edges.
Examples
> G1 := Graph(Edges(Edge('a',1,2), Edge('b',2,3), Edge('c',3,4)), Nodes(1,2,3,4,5));
G1 := Graph(Edges(Edge(a,1,2),Edge(b,2,3),Edge(c,3,4)),Nodes(1,2,3,4,5))
> InduceGraph(G1, Edges(Edge('b',2,3)));
Graph(Edges(Edge(a,1,2),Edge(c,3,4)),Nodes(1,2,3,4,5))
> InduceGraph(G1, Nodes(2,3));
Graph(Edges(),Nodes(1,4,5))
> InduceGraph(Graph(Edges(), Nodes(1,2,3,4)), Nodes(1,2,3,4));
Graph(Edges(),Nodes())
See also BipartiteGraph,   Clique,   DrawGraph,   Edge,   EdgeComplement,   Edges,   FindConnectedComponents,   Graph,   Graph_Rand,   MaxCut,   MaxEdgeWeightClique,   MST,   Nodes,   Path,   RegularGraph,   ShortestPath,   TetrahedronGraph,   VertexCover