set.seed(42)
G <- igraph::sample_smallworld(dim = 1, size = 100, nei = 2, p = 0.2)
# Obtain the degree-based spectral density
density <- fast.spectral.density(G = G, npoints = 80, numCores = 1)
density
Run the code above in your browser using DataLab