V - the type of vertexes in this graphpublic interface SimilarityGraph<V>
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsVertex(V vertex)
Returns true if this graph contains
vertex, false otherwise. |
int |
degree(V vertex)
Return the number of edges incident to
vertex. |
com.google.common.base.Optional<SimEdge<V>> |
findEdge(V vertex1,
V vertex2)
Find the edge between
vertex1 and vertex2. |
void |
forEachEdge(Procedure<SimEdge<V>> procedure)
Applies the procedure to each edge in this graph
|
void |
forEachEdge(V vertex,
Procedure<SimEdge<V>> procedure)
Applies the procedure to each edge that is connected to
vertex |
void |
forEachNeighbour(V vertex,
Procedure<V> procedure)
Applies the procedure to each vertex that is a neighbour of
vertex |
void |
forEachVertex(Procedure<V> procedure)
Applies the procedure to each vertex in this graph
|
int |
getEdgeCount()
Returns the number of edges in this graph
|
Iterable<SimEdge<V>> |
getEdges()
Return an Iterable that iterates over the SimEdge's in this graph.
|
Iterable<SimEdge<V>> |
getEdges(V vertex)
Return an Iterable that iterates over all the edges connected to
vertex. |
Iterable<V> |
getNeighbors(V vertex)
Return an Iterable that iterates over the neighbours of
vertex. |
int |
getVertexCount()
Return the number of vertexes in this graph.
|
Iterable<V> |
getVertices()
Return an Iterable that iterates over the vertices in this graph.
|
int getVertexCount()
Iterable<V> getVertices()
void forEachVertex(Procedure<V> procedure)
procedure - a Procedure valueIterable<SimEdge<V>> getEdges()
void forEachEdge(Procedure<SimEdge<V>> procedure)
procedure - a Procedure valueIterable<V> getNeighbors(V vertex)
vertex.vertex - the vertex whose neighbours are to be iteratedvertexvoid forEachNeighbour(V vertex, Procedure<V> procedure)
vertexvertex - the vertex whose neighbours are to have the procedure appliedprocedure - a Procedure valueIterable<SimEdge<V>> getEdges(V vertex)
vertex.vertex - the vertex whose edges are to be iteratedvertexvoid forEachEdge(V vertex, Procedure<SimEdge<V>> procedure)
vertexvertex - the vertex whose edges are to have the procedure appliedprocedure - a Procedure valuecom.google.common.base.Optional<SimEdge<V>> findEdge(V vertex1, V vertex2)
vertex1 and vertex2. If there is no edge between
vertex1 and vertex2 an Optional that contains no SimEdge is returned.vertex1 - the start vertexvertex2 - the end vertexvertex1 and vertex2. If no
such edge exists an Optional that contains no reference is returnedint degree(V vertex)
vertex.vertex - the vertex to checkvertexboolean containsVertex(V vertex)
vertex, false otherwise.vertex - the vertex to checkvertex, false otherwiseint getEdgeCount()
Copyright © 2016. All Rights Reserved.