|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fhstralsund.vinets.algorithm.dfs.DFSAdapter
de.fhstralsund.vinets.algorithm.LargeCycleFinder
public class LargeCycleFinder
Finds a large cycle in the graph using DFS. The cycle consists of some tree edges plus ONE back edge. Therefore the cycle is probably NOT the largest cycle in the graph.
Constructor Summary | |
---|---|
LargeCycleFinder()
|
Method Summary | |
---|---|
boolean |
accept(Parameter params)
Checks whether the passed Parameter is appropriate as input for this Algorithm. |
void |
discoveredNode(Node node,
Node parent,
int timestamp)
|
Parameter |
execute(Parameter params)
Examines the Graph passed within the Parameter object. |
void |
foundEdge(Edge edge,
Node from,
java.lang.Object edgetype)
|
java.lang.String |
getHint()
Delivers a short help text explaining the features of this Algorithm. |
java.lang.String |
getName()
Delivers a text for the button linked to this Algorithm. |
java.util.Iterator |
largestCycleEdges()
Returns an Iterator over the edges forming the largest cycle found. |
java.util.Iterator |
largestCycleElements()
Returns an Iterator over the nodes and edges forming the largest cycle found. |
int |
largestCycleLength()
Returns the length of the largest cycle found. |
java.util.Iterator |
largestCycleNodes()
Returns an Iterator over the nodes forming the largest cycle found. |
Methods inherited from class de.fhstralsund.vinets.algorithm.dfs.DFSAdapter |
---|
beginConnectedComponent, finishDFS, finishedNode, startDFS |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LargeCycleFinder()
Method Detail |
---|
public boolean accept(Parameter params)
Algorithm
false
is returned,
the Parameter message should be set to a String describing the
cause for the failing.
accept
in interface Algorithm
params
- a Parameter object containing the input Graph and
possible additional input values.
public java.lang.String getHint()
Algorithm
getHint
in interface Algorithm
public java.lang.String getName()
Algorithm
getName
in interface Algorithm
public Parameter execute(Parameter params)
Algorithm
execute
in interface Algorithm
params
- a Parameter encapsulating a Graph and (optionally) a
String and additional properties.
Parameter
public void discoveredNode(Node node, Node parent, int timestamp)
discoveredNode
in interface de.fhstralsund.vinets.algorithm.dfs.DFSListener
discoveredNode
in class de.fhstralsund.vinets.algorithm.dfs.DFSAdapter
public void foundEdge(Edge edge, Node from, java.lang.Object edgetype)
foundEdge
in interface de.fhstralsund.vinets.algorithm.dfs.DFSListener
foundEdge
in class de.fhstralsund.vinets.algorithm.dfs.DFSAdapter
public java.util.Iterator largestCycleElements()
public java.util.Iterator largestCycleNodes()
public java.util.Iterator largestCycleEdges()
public int largestCycleLength()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |