|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--Vertex
|
+--ColoringVertex
| Field Summary | |
protected int |
color
|
protected static int |
MINCOLOR
|
| Fields inherited from class Vertex |
neighbors, xFactor, yFactor |
| Constructor Summary | |
ColoringVertex()
|
|
| Method Summary | |
boolean |
agree()
This method should determine if vertex state agrees to rules of a specified algorithm |
java.lang.Object |
clone()
This method works properly only with vertices without edges. |
static int |
colorsUsed(Graph g)
returns actual number of used colors in a whole graph g assuming that vertices extends ColoringVertex |
int |
getColor()
|
int |
getState()
|
java.lang.String |
getStateInfo()
This method should get a state info of a vertex. |
abstract void |
move(int info)
This method should make a move assuming that vertex is enabled. |
void |
paintState(java.awt.Graphics graphics)
This method should paint a vertex according to its state, however in Vertex class it just paint circles with radius in red. |
void |
printState()
This method should print a state of a vertex. |
void |
randomState(java.util.Random r)
This method should random a state of a vertex. |
void |
setState(int i)
|
| Methods inherited from class Vertex |
addEdge, deg, distance, getInfo, getName, getRadius, getXCoordinate, getYCoordinate, iterator, print, setCoordinates, setFactors, setName, setRadius, setXCoordinate, setYCoordinate |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int color
protected static final int MINCOLOR
| Constructor Detail |
public ColoringVertex()
| Method Detail |
public abstract void move(int info)
Vertex
move in class Vertexpublic int getColor()
public static int colorsUsed(Graph g)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Vertex
clone in class Vertexjava.lang.CloneNotSupportedExceptionpublic boolean agree()
Vertex
agree in class Vertexpublic void randomState(java.util.Random r)
Vertex
randomState in class Vertexpublic void setState(int i)
public int getState()
public void printState()
Vertex
printState in class Vertexpublic java.lang.String getStateInfo()
Vertex
getStateInfo in class VertexVertexInfoDialogpublic void paintState(java.awt.Graphics graphics)
Vertex
paintState in class VertexVertex.setRadius(int),
Graph.paintStates(java.awt.Graphics)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||