View source: R/6-grafos-matriz.R
shave_cycle | R Documentation |
Removing dangling vertices of a cycle obtained by adding a single edge to a spanning tree.
shave_cycle(v, eG)
v |
Edge vector of the hairy cycle |
eG |
Graph given as edgelist, see as_edgelist |
When generating a fundamental cycle in a graph, addition of a single edge to a spanning tree gives a "hairy" cycle, that is, a single cycle with some dangling branches of the tree. This routine removes iteratively all leaves from this "hairy" tree until only a 2-regular, connected cycle remains, which is a fundamental cycle of the graph with respect the given spanning tree.
Edge vector of the shaven cycle, to be interpreted with respect to the edgelist eG.
Cesar Asensio
generate_fundamental_cycles generates the edge vectors of a system of fundamental cycles of a graph, apply_incidence_map applies the incidence map of a graph to an edge vector.
## It is used as a subroutine in [generate_fundamental_cycles].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.