|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Vertex
a graph vertex
Field Summary |
---|
Fields inherited from interface helix.graph.model.Registry |
---|
Color, Colors, Comment, IsDirect, Label, Orientation, Rank |
Method Summary | |
---|---|
int |
degree()
get the number edges that are incident edges to this vertex |
Iterable<Edge> |
edges()
get Iterable over all edges that are incident to this vertex |
Edge |
getEdgeTo(Vertex v)
get the edge between this vertex and destination vertex v (if it exists) |
boolean |
hasEdgeTo(Vertex v)
tells if there is an edge between this vertex and destination vertex v (if it exists). |
Iterable<Vertex> |
neighbors()
get Iterable over all vertices that are adjacent to this vertex note: the following codes are equivalent :
for (Vertex w : v.neighbors())
and :
for (Edge e : v.edges()) { |
Methods inherited from interface helix.graph.model.Registry |
---|
copy, get, has, keys, registry, remove, set, set, set, set, set, set |
Method Detail |
---|
int degree()
Edge getEdgeTo(Vertex v)
v
- destination vertex
boolean hasEdgeTo(Vertex v)
getEdgeTo(v) != null
v
- destination vertex
Iterable<Edge> edges()
Iterable<Vertex> neighbors()
for (Vertex w : v.neighbors())
something(w);
and :
for (Edge e : v.edges()) {
Vertex w = e.getVertexTo(v);
something(w);
}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |