Description Usage Arguments Details Value Note
Function to add edges into a graph. The following methods are implemented so far:
addEdgesComplete
Generates a simple complete graph. I.e., an edge exists between each two nodes. However, no self-loops or multi-edges are included.
addEdgesGrid
Only usefull if nodes are generated via addNodesGrid
.
This method generates a Manhattan-like street network.
addEdgesOnion
This method determines the nodes on the convex hull
of the node cloud in the euclidean plane and adds edges between neighbour nodes.
Ignoring all nodes on the hull, this process is repeated iteratively resulting in an
onion like peeling topololgy. Note that the graph is not connected! In order to
ensure connectivity, another edge generator must be applied in addition, e.g.,
addEdgesSpanningTree
.
addEdgesDelauney
Edges are determined by means of a Delauney triangulation of the node coordinates in the Euclidean plane.
addEdgesWaxman
Edges are generated using the Waxman-model, i.e., the probability p_{ij} for the edge (i, j) is given by
p_{ij} = α e^{-β d_{ij}}
, where α, β ≥q 0 are control parameters and d_{ij} is the Euclidean distance of the nodes i and j.
addEdgesSpanningTree
A minimum spanning tree is computed based on
a complete random weight matrix. All edges of the spanning tree are added. If runs
is greater 1, the process is repeated for runs
. However, already added edges are
ignored in subsequent runs.
This method is particularly useful to assist probablistic methods, e.g., Waxman model,
in order to generate connected graphs.
addEdgesGilbert
Use Gilbert-model to generate edges. I.e., each edge is added with probability p \in [0, 1].
addEdgesErdosRenyi
In total m ≤q n(n-1)/2 edges are added at random.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | addEdgesComplete(graph, ...)
addEdgesGrid(graph, ...)
addEdgesOnion(graph, ...)
addEdgesDelauney(graph, ...)
addEdgesWaxman(graph, alpha = 0.5, beta = 0.5, ...)
addEdgesGilbert(graph, p, ...)
addEdgesErdosRenyi(graph, m, ...)
addEdgesSpanningTree(graph, runs = 1L, ...)
|
graph |
[ |
... |
[any] |
alpha |
[ |
beta |
[ |
p |
[ |
m |
[ |
runs |
[ |
Currently all edge generators create symmetric edges only.
[list
] List with components:
matrix
Adjacency matrix.
character(1)
]String description of the generator used.
These functions are not meant to be called directly. Instead, they need
to be assigned to the generator
argument of addEdges
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.