| 1 | initial version |
Like that
[G for G in graphs.nauty_geng("8 -c")
if all(f.degree() <= 1 for f, d in G.laplacian_matrix().charpoly().factor())]
| 2 | No.2 Revision |
Like that
L = [G for G in graphs.nauty_geng("8 -c")
if all(f.degree() <= 1 for f, d in G.laplacian_matrix().charpoly().factor())]
Then you have a list of graphs. You can then use
graphics_array([G.plot() for G in L])
or any other way to display them.
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.