java.lang.Object
org.jgrapht.alg.cycle.Cycles
Collection of helper methods related to cycles.
- Author:
- Dimitrios Michail
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V,
E> GraphPath<V, E> simpleCycleToGraphPath
(Graph<V, E> graph, List<E> cycle) Transform a simple cycle from an edge set representation to a graph path.
-
Constructor Details
-
Cycles
public Cycles()
-
-
Method Details
-
simpleCycleToGraphPath
Transform a simple cycle from an edge set representation to a graph path. A simple cycle contains vertices with degrees either zero or two. This method treats directed graphs as undirected.- Type Parameters:
V
- graph vertex typeE
- graph edge type- Parameters:
graph
- the graphcycle
- the simple cycle- Returns:
- the cycle as a graph path
- Throws:
IllegalArgumentException
- if the provided edge set is not a simple cycle (circuit)
-