|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cycle<V,E extends Link<V>>
Cycle is define as an undirected path in which :
Method Summary | |
---|---|
boolean |
contains(E edge)
Tell if this cycle contains a given edge. |
boolean |
contains(V vertex)
Tell if this cycle contains a given vertex. |
java.util.Iterator<E> |
edgeIterator()
Give an Iterator on the edges of this cycle. |
java.util.Iterator<E> |
edgeIterator(E firstEdge)
Give an Iterator on the edges of this cycle. |
E[] |
getEdges(V vertex)
Returns the two edges containing the given vertex in a 2-elements array where one edge is placed in the first position (index 0) and the other edge occupies the second position (index 1). |
boolean |
isDirected()
Tell if this cycle is directed or not. |
int |
length()
Give the length of this cycle (in terms of edges). |
java.util.Iterator<V> |
vertexIterator()
Give an Iterator on the vertices of this cycle. |
java.util.Iterator<V> |
vertexIterator(V firstVertex)
Give an Iterator on the vertices of this cycle. |
Method Detail |
---|
boolean contains(V vertex)
vertex
- The vertex.
true
if the given vertex belong to this cycle and
false
otherwise.boolean contains(E edge)
edge
- The edge.
true
if the given edge belong to this cycle and
false
otherwise.java.util.Iterator<V> vertexIterator()
Iterator
on the vertices of this cycle. The first returned
vertices and the direction of the course of the cycle are undetermined. You
must note that the remove operation of the returned Iterator
is
unsuported.
Iterator
.java.util.Iterator<V> vertexIterator(V firstVertex)
Iterator
on the vertices of this cycle. The first returned
vertices is given as argtument and the direction of the course of the cycle
is undetermined. You must note that the remove operation of the returned
Iterator
is unsuported.
firstVertex
- The first returned vertex.
Iterator
.
java.lang.IllegalArgumentException
- If firstVertex
does not belong to this cycle.java.util.Iterator<E> edgeIterator()
Iterator
on the edges of this cycle. The first returned
edges and the direction of the course of the cycle are undetermined. You
must note that the remove operation of the returned Iterator
is
unsuported.
Iterator
.java.util.Iterator<E> edgeIterator(E firstEdge)
Iterator
on the edges of this cycle. The first returned
edges is given as argument and the direction of the course of the cycle is
undetermined. You must note that the remove operation of the returned
Iterator
is unsuported.
firstEdge
- the first edge returned by the Iterator
Iterator
.
java.lang.IllegalArgumentException
- If firstEdge
does not belong to this cycle.E[] getEdges(V vertex)
vertex
- The vertex.
java.util.NoSuchElementException
- if the vertex does not belong to this cycle.int length()
boolean isDirected()
true
if this cycle is directed and
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |