|
Jedit 4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.bsu.cs.algorithm.Algorithm | +--edu.bsu.cs.algorithm.Fragments
An animated implementation of the Fragments algorithm.
Field Summary | |
protected int |
startVertex
|
Constructor Summary | |
Fragments()
|
|
Fragments(JavaGraph jGraph,
Vector inputs,
Vector animation)
|
Method Summary | |
protected int |
amountOfFragments()
|
protected int |
amountOfMarkedVertices(JavaGraph G)
Returns the number of marked vertices in G |
protected int |
amountOfUnmarkEdges(JavaGraph G,
int vertexNumber)
Returns the number of edges that are incident to vertexNumber and are not martked |
void |
callOwnConstructor(JavaGraph jGraph,
Vector inputs,
Vector animation)
This method is called by Jedit for any algorithm it executes and must be used in any working algorithm. |
protected JavaGraph |
closeOutOfCyclePaths(JavaGraph G)
Marks all the edges of the vertices that cannot be in the cycle, this avoids getting stacked . |
protected int |
executeFragments(JavaGraph jGraph,
JavaGraph myCycle)
|
protected boolean |
existEdge(JavaGraph myGraph,
int v1,
int v2)
|
protected JavaGraph |
findCycle(JavaGraph jGraph)
Finds any cycle in the graph |
protected void |
fragments(JavaGraph jGraph,
Vector inputs,
Vector animation)
Called by the constructor to do all of the work |
protected JavaGraph |
getFragmentAt(int i)
Returns the fragment contain at position i |
protected boolean |
isThisEdgeMarked(JavaGraph G,
int x,
int y)
Returns true if the edge x->y or y->x is marked, false otherwise |
protected void |
that()
|
protected JavaGraph |
unMarkGraphAB(JavaGraph target,
JavaGraph B,
JavaGraph C)
Unmark all the edges and vertices in A which are marked in B. |
Methods inherited from class edu.bsu.cs.algorithm.Algorithm |
getCode, getDescription, getName, getType, setCode, setDescription, setFromResources, setName, setType, succeeded, succeeded |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int startVertex
Constructor Detail |
public Fragments()
public Fragments(JavaGraph jGraph, Vector inputs, Vector animation)
Method Detail |
protected void that()
protected void fragments(JavaGraph jGraph, Vector inputs, Vector animation)
protected JavaGraph getFragmentAt(int i)
protected int amountOfFragments()
protected boolean existEdge(JavaGraph myGraph, int v1, int v2)
protected int amountOfUnmarkEdges(JavaGraph G, int vertexNumber)
protected JavaGraph closeOutOfCyclePaths(JavaGraph G)
protected JavaGraph findCycle(JavaGraph jGraph)
protected JavaGraph unMarkGraphAB(JavaGraph target, JavaGraph B, JavaGraph C)
protected int amountOfMarkedVertices(JavaGraph G)
protected int executeFragments(JavaGraph jGraph, JavaGraph myCycle)
protected boolean isThisEdgeMarked(JavaGraph G, int x, int y)
public void callOwnConstructor(JavaGraph jGraph, Vector inputs, Vector animation)
Algorithm
callOwnConstructor
in class Algorithm
jGraph
- the edu.bsu.cs.graph.JavaGraph that the algorithm is performed oninputs
- a Vector of inputs that consists of
animation
- a Vector that is filled with AnimObjects as the algorithm proceeds. It must be instantiated before this method is called.
|
Jedit 4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |