|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--graph.Vertex
The attributes of a vertex are its height and the array of faces surrounding that vertex.
There is a crude parallelism between the Vertex and Face classes, corresponding to the duality of planar maps that exchanges vertices and faces.
Inner Class Summary | |
static class |
Vertex.Test
|
Method Summary | |
int |
faceCount(int minGon,
int maxGon)
Count the number of faces at the vertex that have between minGon and maxGon faces (inclusive). |
Face |
getAny()
getAny returns any face of the vertex. |
int |
getHeight()
The height is a field that has only minor significance. |
Face |
next(Face f,
int count)
Find the count'th successor to Face f in the cyclic order around the vertex. |
int |
nonFinalCount()
nonFinalCount is the number of Faces around the vertex that are not final. |
int |
size()
The size of a vertex is the number of faces with that vertex. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int faceCount(int minGon, int maxGon)
minGon
- int giving the minimum number of vertices for a face to be included in
the countmaxGon
- int giving the maximum number of vertices for a face to be included in
the count
Example: faceCount(3,3) number of nonFinal triangles around a vertex. faceCount(4,4) number of nonFinal quadrilaterals around a vertex. faceCount(5,Integer.MAX_VALUE) number of nonFinal exceptional faces around a vertex.
public int nonFinalCount()
public int getHeight()
The height has no significance for final graphs.
public int size()
public Face next(Face f, int count)
Examples: next(f,0) = f; next(f,size())=f; next(f,1) = successor, ....
Face.next moves clockwise around the face, but Vertex.next moves counterclockwise. This means that if faces R and S share an edge E with terminal vertices x and y, and if y occurs clockwise around R from x, then S=x.next(R,1); R=y.next(S,1); x=S.next(y,1); y=R.next(x,1); See graphDoc.gif
f
- the Face used as a base point around the Vertex.count
- this many faces past f to locate the Face returned.
The return value only depends on count mod this.size();public Face getAny()
In the unlikely event that the vertex has no faces, a null is returned;
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |