|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.inria.opengve.bridge.algorithms.common.FindElementaryCycles<V,E,G>
public abstract class FindElementaryCycles<V,E extends Link<V>,G extends Graph<V,E>>
This algorithms compute all the elementary cycles on a graph. Note that the graph can be oriented or not. The graph must be connected. The algorithms can be found in "Mesh-based Survivable Networks" by Wayne D.Grover.
| Constructor Summary | |
|---|---|
FindElementaryCycles(G g,
AbstractScalar maxCost)
This Constructor initialize algorithms with a cost of one on each edges. |
|
FindElementaryCycles(G g,
Map edgeCost,
AbstractScalar maxCost)
Constructor. |
|
| Method Summary | |
|---|---|
protected abstract CopyGraph<V,E,G> |
createCopyGraph()
Create a new copy tool. |
protected abstract FindElementaryCyclesFrom<V,E,G> |
createFindElementaryCyclesFrom(G g,
V root,
Map edgeCost,
AbstractScalar maxCost)
Create a new object of type FindElementaryCyclesFrom. |
java.util.HashSet<Cycle<V,E>> |
getSolution()
Give the set of cycles in graph g. |
void |
run()
Compute all the elementary cycles of graph. |
void |
setEdgeCostContext(java.lang.Object context)
Change the context used to access cost of edges in the Map cost. |
void |
setEdgeCostName(java.lang.String name)
Change the name used to access cost of edge in the Map cost. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FindElementaryCycles(G g,
Map edgeCost,
AbstractScalar maxCost)
g - The graph on which we search cycles.edgeCost - A map containing association of edge with AbstractScalar
representing the cost of the edge.maxCost - The maximun cost of the computed cycles.
public FindElementaryCycles(G g,
AbstractScalar maxCost)
g - The graph on which we search cycles.maxCost - The maximun length cycles.| Method Detail |
|---|
protected abstract CopyGraph<V,E,G> createCopyGraph()
protected abstract FindElementaryCyclesFrom<V,E,G> createFindElementaryCyclesFrom(G g,
V root,
Map edgeCost,
AbstractScalar maxCost)
g - The graph on which we search cycles.root - The "root" node of the cycles.edgeCost - The map containing cost of edges.maxCost - The maximum cost allowed for cycle.
public void run()
public void setEdgeCostName(java.lang.String name)
Map cost.
name - The new name used to access cost of edges.public void setEdgeCostContext(java.lang.Object context)
Map cost.
context - The new context used to access cost of edge.public java.util.HashSet<Cycle<V,E>> getSolution()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||