Description Usage Arguments Value Note

Function for adding weight(s) to edges. The following functions
are implemented and may be passed as argument `generator`

to `addWeights`

:

`addWeightsRandom`

Add purely random weights. Calls the passed

`method`

, e.g.,`method = runif`

to generate weights.`addWeightsDistance`

Weights correspond to a distance metric based on the node coordinates in the Euclidean plane. Internally function

`dist`

is called.`addWeightsCorrelated`

This method generates two weight matrices with correlated weights. The correlation may be adjusted by the

`rho`

argument. Here, the first weight of an edge is the Euclidean distance between the nodes in the plane and the second one is generated in a way, that the correlation is close to`rho`

.`addWeightsCocave`

This method is interesting for generating bi-objective graphs to benchmark algorithms for the multi-criteria spanning tree problem. Graphs generated this way expose a concave Pareto-front.

1 2 3 4 5 6 7 | ```
addWeightsConcave(graph, xhi = 10, nu = 20, M = 100, ...)
addWeightsCorrelated(graph, rho, ...)
addWeightsDistance(graph, method, ...)
addWeightsRandom(graph, method, ...)
``` |

`graph` |
[ |

`xhi` |
[ |

`nu` |
[ |

`M` |
[ |

`...` |
[any] Further arguments. Not used at the moment. This may be useful for user-written weight generators. |

`rho` |
[ |

`method` |
[ |

[`list`

] A list with components

- weights [
`list`

] List of weight matrices. Even in the case of one weight matrix it is wrapped in a list of length one.

- generator [
`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 `addWeights`

.

jakobbossek/grapherator documentation built on Oct. 9, 2018, 3:21 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.