- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
UniformIntrusiveEdgesSpecifics
,WeightedIntrusiveEdgesSpecifics
An interface for the set of intrusive edges of a graph.
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.
- Author:
- Dimitrios Michail
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Add a new edge.boolean
containsEdge
(E e) Check if an edge existsGet the edge setgetEdgeSource
(E e) Get the source vertex of an edge.getEdgeTarget
(E e) Get the target vertex of an edge.double
getEdgeWeight
(E e) Get the weight of an edge.void
Remove an edge.void
setEdgeWeight
(E e, double weight) Set the edge weight
-
Method Details
-
getEdgeSource
Get the source vertex of an edge.- Parameters:
e
- the edge- Returns:
- the source vertex
-
getEdgeTarget
Get the target vertex of an edge.- Parameters:
e
- the edge- Returns:
- the target vertex
-
add
Add a new edge.- Parameters:
e
- the edge to addsourceVertex
- the source vertextargetVertex
- the target vertex- Returns:
- true if the edge was added, false if the edge was already present
-
containsEdge
Check if an edge exists- Parameters:
e
- the input edge- Returns:
- true if an edge exists, false otherwise
-
getEdgeSet
Get the edge set- Returns:
- the edge set
-
remove
Remove an edge.- Parameters:
e
- the edge to remove.
-
getEdgeWeight
Get the weight of an edge.- Parameters:
e
- the edge- Returns:
- the edge weight
-
setEdgeWeight
Set the edge weight- Parameters:
e
- the edgeweight
- the new weight
-