public class EulerCircleFinder extends Object
This algortihm does not check if the searched graph is entirely connected. It is the callers responsibility to assure the graph is entirely connected. Otherwise an Euler circle in any connected set of the graph will be found.
If there is no Euler circle in the graph a GraphException will be thrown when the graph is searched. Euler's Circle Law says a graph has a Euler circle if and only if the graph is entirely connected and every vertex has an even degree (i.e. number of edges).
It seems to me that the time needed to find a Euler circle using this algorithm is proportional to the number of edges in the graph.
| Modifier and Type | Method and Description |
|---|---|
static Graph |
clone(Graph g) |
static Path |
find(Graph g)
Returns a Path wich is a Euler circle in the given graph or
null
if there is no Euler circle in this graph. |
Copyright © 2019 JULIE Lab, Germany. All rights reserved.