Description Usage Arguments Details Value Note Examples
given_degree_list
creates an adjacency matrix representation of an
undirected graph generated with a given degree sequence
1 | given_degree_list(N, degree, max_iterations = 1000)
|
N |
Number of vertices / nodes in the network. |
degree |
number of neighbours of each node. |
This functon generates an undirected random graph of size N
, each node
having degree given by the user. The code only generates "simple" graphs:
Self and repeated edges are not permitted. For this reason
so for speed reasons checks are performed during edge creation.
adjacency list representation of the resultant network
For speed reasons, checks are performed during an edge creation to ensure the pairing does not create a loop nor multiple edges between the same nodes. This may introduce some bias in the algorithm. I need to read up on this but for the time being I think this is ok.
1 2 3 | N <- 1000
degree <- rep(2, N)
gr <- given_degree_list(N, degree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.