Learn R Programming

dodgr (version 0.2.8)

compare_heaps: compare_heaps

Description

Perform timing comparison between different kinds of heaps as well as with equivalent igraph routine distances. To do this, a random sub-graph containing a defined number of vertices is first selected. Alternatively, this random sub-graph can be pre-generated with the dodgr_sample function and passed directly.

Usage

compare_heaps(graph, nverts = 100, replications = 2)

Arguments

graph

data.frame object representing the network graph (or a sub-sample selected with codedodgr_sample)

nverts

Number of vertices used to generate random sub-graph. If a non-numeric value is given, the whole graph will be used.

replications

Number of replications to be used in comparison

Value

Result of rbenchmark::benchmark comparison in data.frame form.

Examples

Run this code
# NOT RUN {
graph <- weight_streetnet (hampi)
# }
# NOT RUN {
compare_heaps (graph, nverts = 1000, replications = 1)
# }

Run the code above in your browser using DataLab