|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--BipartiteGraph
A repręsentation of a bipartite graph. The graph is represented only by the nodes - the edges are not stored explicit in the graph. The nodes are put into two lists, V1 and V2.
Constructor Summary | |
BipartiteGraph()
|
Method Summary | |
java.lang.String |
getMatches()
Get a string representation of the edges that are part of the matching. |
void |
loadDataFromFile(java.lang.String filename)
Loads an input graph from a file Input data are read from a file and the corresponding graph is constructed. |
void |
removeColors()
Colors the nodes white All the nodes composing the graph are run through. |
Node |
runTransitionSystem()
Run the graph coloring algorithm. |
void |
toLaTeX(java.lang.String filename)
Produces a graphical LaTeX output of a graph. |
void |
toLaTeX(java.lang.String filename,
boolean only_pairs)
Produces a graphical LaTeX output of a graph. |
java.lang.String |
toString()
Returns a string representation of the graph. |
void |
turnEdges(Node v0)
Turns the edges around. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BipartiteGraph()
Method Detail |
public Node runTransitionSystem()
public void turnEdges(Node v0)
v0
to an initial node. It
runs in O(|m'|) where m' are the edges that lie
on the path.
The terminal node v0
must come from a call
to runTransitionSystem()
because that method also stores
information needed to find a path back to an initial node.v0
- a terminal node as returned by runTransitionSystem()runTransitionSystem()
public void removeColors()
public void loadDataFromFile(java.lang.String filename)
filename
- an input data file describing a graph.public void toLaTeX(java.lang.String filename)
filename
- the LaTeX output will be saved here.public void toLaTeX(java.lang.String filename, boolean only_pairs)
filename
- the LaTeX output will be saved here.only_pairs
- boolean that indicates whether the produced
graph should contain all the edges or only the pair edges.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getMatches()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |