Learn R Programming

dodgr (version 0.2.8)

dodgr_fundamental_cycles: dodgr_fundamental_cycles

Description

Calculate fundamental cycles in a graph.

Usage

dodgr_fundamental_cycles(
  graph,
  vertices = NULL,
  graph_max_size = 10000,
  expand = 0.05
)

Arguments

graph

data.frame or equivalent object representing the contracted network graph (see Details).

vertices

data.frame returned from dodgr_vertices(graph). Will be calculated if not provided, but it's quicker to pass this if it has already been calculated.

graph_max_size

Maximum size submitted to the internal C++ routines as a single chunk. Warning: Increasing this may lead to computer meltdown!

expand

For large graphs which must be broken into chunks, this factor determines the relative overlap between chunks to ensure all cycles are captured. (This value should only need to be modified in special cases.)

Value

List of cycle paths, in terms of vertex IDs in graph and, for spatial graphs, the corresponding coordinates.

Examples

Run this code
# NOT RUN {
net <- weight_streetnet (hampi)
graph <- dodgr_contract_graph (net)
verts <- dodgr_vertices (graph)
cyc <- dodgr_fundamental_cycles (graph, verts)
# }

Run the code above in your browser using DataLab