Skip to contents

This is the constructor for objects of class nvd.

Usage

nvd(
  model = "smallworld",
  n = 1L,
  num_vertices = 25L,
  model_params = list(dim = 1L, nei = 4L, p = 0.15),
  seed = 1234
)

Arguments

model

A string specifying the model to be used for sampling networks (current choices are: "sbm", "k_regular", "gnp", "smallworld", "pa", "poisson" and "binomial"). Defaults to "smallworld".

n

An integer specifying the sample size. Defaults to 1L.

num_vertices

An integer specifying the order of the graphs to be generated (i.e. the number of nodes). Defaults to 25L.

model_params

A named list setting the parameters of the model you are considering. Defaults to list(dim = 1L, nei = 4L, p = 0.15) which sets defaults parameters for the Watts-Strogatz small-world model generator.

seed

An integer specifying the random generator seed. Defaults to 1234.

Value

A nvd object which is a list of igraph

objects.

Examples

smallworld_params <- list(dim = 1L, nei = 4L, p = 0.15)
nvd(model_params = smallworld_params)
#> [[1]]
#> IGRAPH 10e1798 U--- 25 100 -- Watts-Strogatz random graph
#> + attr: name (g/c), dim (g/n), size (g/n), nei (g/n), p (g/n), loops
#> | (g/l), multiple (g/l)
#> + edges from 10e1798:
#>  [1]  1-- 2  2-- 3  4--13  4-- 5  5-- 6  6-- 7  7--17  8-- 9 10--19 10--11
#> [11]  1--11 12--13 13--14 14--15 15--16 16--17 17--18 18--19 19--20  2--21
#> [21] 21--22 22--23 20--23 24--25  1--25  1-- 3  1--24  1-- 4  1--23  1-- 5
#> [31]  1--22  2--25  2-- 4  2--24  2-- 5  2--23  2-- 6  5--19  3--25  3-- 6
#> [41]  3--24  3--16  4-- 6  4-- 7  4--25  4-- 8  5-- 7  5-- 8  5-- 9  8--13
#> [51]  6-- 9  6--10  7-- 9  7--10  7--11  8--10  8--11  8--23  9--11  9--12
#> [61]  9--13 10--12 10--13  5--10 11--13 11--14  6--15 12--14 12--15 12--16
#> + ... omitted several edges
#> 
#> attr(,"class")
#> [1] "nvd"  "list"