-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
UniformIntrusiveEdgesSpecifics
,WeightedIntrusiveEdgesSpecifics
public interface IntrusiveEdgesSpecifics<V,E> extends Serializable
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(E e, V sourceVertex, V targetVertex)
Add a new edge.boolean
containsEdge(E e)
Check if an edge existsSet<E>
getEdgeSet()
Get the edge setV
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
-
-
-
Method Detail
-
getEdgeSource
V getEdgeSource(E e)
Get the source vertex of an edge.- Parameters:
e
- the edge- Returns:
- the source vertex
-
getEdgeTarget
V getEdgeTarget(E e)
Get the target vertex of an edge.- Parameters:
e
- the edge- Returns:
- the target vertex
-
add
boolean add(E e, V sourceVertex, V targetVertex)
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
boolean containsEdge(E e)
Check if an edge exists- Parameters:
e
- the input edge- Returns:
- true if an edge exists, false otherwise
-
remove
void remove(E e)
Remove an edge.- Parameters:
e
- the edge to remove.
-
getEdgeWeight
double getEdgeWeight(E e)
Get the weight of an edge.- Parameters:
e
- the edge- Returns:
- the edge weight
-
setEdgeWeight
void setEdgeWeight(E e, double weight)
Set the edge weight- Parameters:
e
- the edgeweight
- the new weight
-
-