fast.spectral.density: Degree-based spectral density

Description Usage Arguments Value References Examples

View source: R/statGraph.R

Description

fast.spectral.density returns the degree-based spectral density in the interval <from,to> by using npoints discretization points.

Usage

1
fast.spectral.density(G, from = NULL, to = NULL, npoints = 2000, numCores = 1)

Arguments

G

The undirected unweighted graph (igraph type) whose spectral density we want to obtain.

from

Lower end of the interval that contain the eigenvalues or smallest eigenvalue of the adjacency matrix of the graph. The smallest eigenvalue is used if the value is not given.

to

Upper end of the interval that contain the eigenvalues or largest eigenvalue of the adjacency matrix of the graph. The largest eigenvalue is used if the value is not given.

npoints

Number of discretization points of the interval <from,to>.

numCores

Number of cores to use for parallelization.

Value

Returns the degree-based spectral density of the graph in the

References

Newman, M. E. J., Zhang, X., & Nadakuditi, R. R. (2019). Spectra of random networks with arbitrary degrees. Physical Review E, 99(4), 042309.

Examples

1
2
3
4
5
6
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

statGraph documentation built on May 19, 2021, 9:11 a.m.