|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.inria.opengve.bridge.algorithms.common.FindElementaryCyclesFrom<V,E,G>
public abstract class FindElementaryCyclesFrom<V,E extends Link<V>,G extends Graph<V,E>>
This class compute all cycles of a graph containing a specific vertex. The algorithms can be found in "Mesh-based Survivable Networks" by Wayne D.Grover. This class is used in the more general class FindElementaryCycles.
Constructor Summary | |
---|---|
FindElementaryCyclesFrom(G g,
V root,
AbstractScalar maxLength)
Constructor |
|
FindElementaryCyclesFrom(G g,
V root,
Map edgeCost,
AbstractScalar maxCost)
Constructor. |
Method Summary | |
---|---|
protected abstract Cycle<V,E> |
createCycle(Path<V,E> p,
E e)
Create a new cycle from a path and the edge closing this path. |
protected abstract AbstractScalar |
createIntegerScalar(int value)
Create a new AbstractScalar of type int. |
protected abstract Path<V,E> |
createPath()
Create a new Path. |
java.util.HashSet<Cycle<V,E>> |
getCycles()
Return the set of cycles containing the given node. |
void |
run()
|
void |
setEdgeCostContext(java.lang.Object context)
Change the context used to access cost of edge 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 FindElementaryCyclesFrom(G g, V root, Map edgeCost, AbstractScalar maxCost)
g
- The graph on which we search cycles.root
- The root vertex.edgeCost
- A map giving the cost of each edge.maxCost
- The maximum cost cycle authoized.public FindElementaryCyclesFrom(G g, V root, AbstractScalar maxLength)
g
- The graph on which we search cycles.root
- The root node used.maxLength
- The maximun length of cycles.Method Detail |
---|
protected abstract Path<V,E> createPath()
protected abstract Cycle<V,E> createCycle(Path<V,E> p, E e)
p
- The path.e
- The edge closing path p.
- Returns:
- A new cycle.
protected abstract AbstractScalar createIntegerScalar(int value)
AbstractScalar
of type int.
value
- The value of the new integer AbstractScalar
.
AbstractScalar
.public void run()
public java.util.HashSet<Cycle<V,E>> getCycles()
public void setEdgeCostName(java.lang.String name)
Map
cost.
name
- The new name used to access cost of edge.public void setEdgeCostContext(java.lang.Object context)
Map
cost. Set
context to null
for using default context.
context
- The new context used to access cost of edge.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |