V
- the graph vertex typeE
- the graph edge typepublic interface IntrusiveEdgesSpecifics<V,E> extends Serializable
Since the library supports edges which can be any user defined object, we need to provide explicit support for storing vertex source, target and weight.
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e,
V sourceVertex,
V targetVertex)
Add a new edge.
|
boolean |
containsEdge(E e)
Check if an edge exists
|
Set<E> |
getEdgeSet()
Get the edge set
|
V |
getEdgeSource(E e)
Get the source vertex of an edge.
|
V |
getEdgeTarget(E e)
Get the target vertex of an edge.
|
double |
getEdgeWeight(E e)
Get the weight of an edge.
|
void |
remove(E e)
Remove an edge.
|
void |
setEdgeWeight(E e,
double weight)
Set the edge weight
|
V getEdgeSource(E e)
e
- the edgeV getEdgeTarget(E e)
e
- the edgeboolean add(E e, V sourceVertex, V targetVertex)
e
- the edge to addsourceVertex
- the source vertextargetVertex
- the target vertexboolean containsEdge(E e)
e
- the input edgevoid remove(E e)
e
- the edge to remove.double getEdgeWeight(E e)
e
- the edgevoid setEdgeWeight(E e, double weight)
e
- the edgeweight
- the new weightCopyright © 2018. All rights reserved.