Induce a subgraph by indecies method?
Isn't there a method to induce a sub-graph by its indices?
add a comment
You can use the subgraph method, the indices are kept untouched:
sage: G = graphs.PetersenGraph()
sage: G.subgraph([1,2,4,5])
Subgraph of (Petersen graph): Graph on 4 vertices
sage: H = G.subgraph([1,2,4,5])
sage: H.vertices()
[1, 2, 4, 5]
Asked: 2018-12-27 15:37:37 +0100
Seen: 226 times
Last updated: Dec 27 '18
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.