Learn R Programming

archeofrag (version 1.2.0)

frag.cycles: Count the k-cycles in a graph, for cycles =< k

Description

Count the k-cycles in a graph, for cycles =< k

Usage

frag.cycles(graph, kmax, max.cycles.only=FALSE)

Value

A data frame with the number of k-cycles for each k values in [3;k].

Arguments

graph

An igraph object, must be an undirected graph.

kmax

Maximal length of the cycles to detect.

max.cycles.only

Logical. If TRUE, the fragments are only reported as parts of their longer cycle.

Author

Sebastien Plutniak <sebastien.plutniak at posteo.net>

Details

A cycle can be part of larger cycle: if max.cycles.only all the cycles are reported but, if this parameter is True only the larger cycles are reported. A warning recalls that for cycles k > 4 the fragments of a cycle are not necessarily all connected to each other (a fragment, due to its location in the original object, can only be connected to a limited number of adjacent fragments).

See Also

Examples

Run this code
g <- frag.simul.process(n.components=20, vertices=50, disturbance=.15)
frag.cycles(g, kmax=4, max.cycles.only=FALSE)
frag.cycles(g, kmax=4, max.cycles.only=TRUE)

Run the code above in your browser using DataLab