Integer valued eigenvalues
.
for G in graphs.nauty_geng("8 -c"):
A=G.adjacency_matrix().eigenvalues()
L=G.laplacian_matrix().eigenvalues()
show(A,L)
G.show()
Using the above code, I have obtained the all possible eigenvalues of the adjacency and Laplacian matrix. But I need only those graphs for which the adjacency and laplacian matrices have all integer eigenvalues. How to collect only the integer eigenvalues from this large collection?