I
- Vertex idV
- Vertex dataE
- Edge datapublic interface Vertex<I,V,E>
Modifier and Type | Method and Description |
---|---|
void |
addEdge(E edge)
Add an edge for this vertex (happens immediately)
|
java.lang.Iterable<E> |
getEdges()
Get a read-only view of the out-edges of this vertex.
|
V |
getEdgeValue(I targetVertexId)
Return the value of the first edge with the given target vertex id,
or null if there is no such edge.
|
I |
getId()
Get the vertex id.
|
int |
getNumEdges()
Get the number of outgoing edges on this vertex.
|
V |
getValue()
Get the vertex value (data stored with vertex)
|
void |
initialize(I id,
V value)
Initialize id and value.
|
void |
initialize(I id,
V value,
java.lang.Iterable<E> edges)
Initialize id, value, and edges.
|
void |
removeEdges(I targetVertexId)
Removes all edges pointing to the given vertex id.
|
void |
setEdges(java.lang.Iterable<E> edges)
Set the outgoing edges for this vertex.
|
void |
setEdgeValue(I targetVertexId,
V edgeValue)
If an edge to the target vertex exists, set it to the given edge value.
|
void |
setValue(V value)
Set the vertex data (immediately visible in the computation)
|
void initialize(I id, V value, java.lang.Iterable<E> edges)
id
- Vertex idvalue
- Vertex valueedges
- Iterable of edgesvoid initialize(I id, V value)
id
- Vertex idvalue
- Vertex valueI getId()
V getValue()
void setValue(V value)
value
- Vertex data to be setint getNumEdges()
java.lang.Iterable<E> getEdges()
void setEdges(java.lang.Iterable<E> edges)
edges
- Iterable of edgesV getEdgeValue(I targetVertexId)
targetVertexId
- Target vertex idvoid setEdgeValue(I targetVertexId, V edgeValue)
targetVertexId
- Target vertex idedgeValue
- Edge valuevoid addEdge(E edge)
edge
- Edge to addvoid removeEdges(I targetVertexId)
targetVertexId
- the target vertex id