shave_cycle {gor} | R Documentation |
Shaving a hairy cycle
Description
Removing dangling vertices of a cycle obtained by adding a single edge to a spanning tree.
Usage
shave_cycle(v, eG)
Arguments
v |
Edge vector of the hairy cycle |
eG |
Graph given as edgelist, see as_edgelist |
Details
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.
Value
Edge vector of the shaven cycle, to be interpreted with respect to the edgelist eG.
Author(s)
Cesar Asensio
See Also
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.
Examples
## It is used as a subroutine in [generate_fundamental_cycles].