Interface DirectedSubGraph<V extends DirectedVertex,E extends EdgeSegment>
-
- All Superinterfaces:
Comparable<IdAble>
,IdAble
- All Known Subinterfaces:
ACyclicSubGraph
,ConjugateACyclicSubGraph
,ConjugateDirectedSubGraph
,UntypedACyclicSubGraph<V,E>
- All Known Implementing Classes:
ACyclicSubGraphImpl
,ConjugateACyclicSubGraphImpl
,UntypedACyclicSubGraphImpl
public interface DirectedSubGraph<V extends DirectedVertex,E extends EdgeSegment> extends IdAble
A directed subgraph interface for a given parent graph by registering edge segments on it (and therefore vertices and edges)- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addEdgeSegment(E edgeSegment)
Register an edge segment on the subgraphboolean
containsEdgeSegment(E edgeSegment)
Verify if given edge segment is registered on this subgraphDirectedSubGraph<V,E>
deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call.default int
getNumberOfEdgeSegments(V vertex, boolean exitSegments)
collect the number of exit or entry edgesegments that are present in the subgraph for the given vertex on the parent graphlong
getNumberOfVertices()
The number of registered vertices.default boolean
isEmpty()
Check if no vertices (and therefore not edge segments are present on this sub graphvoid
removeEdgeSegment(E edgeSegment)
Remove an edge segment on the subgraphDirectedSubGraph<V,E>
shallowClone()
Create a shallow copy of this entity-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
-
-
-
Method Detail
-
addEdgeSegment
void addEdgeSegment(E edgeSegment)
Register an edge segment on the subgraph- Parameters:
edgeSegment
- to add
-
removeEdgeSegment
void removeEdgeSegment(E edgeSegment)
Remove an edge segment on the subgraph- Parameters:
edgeSegment
- to remove
-
containsEdgeSegment
boolean containsEdgeSegment(E edgeSegment)
Verify if given edge segment is registered on this subgraph- Parameters:
edgeSegment
- to verify- Returns:
- true when registered, false otherwise
-
getNumberOfVertices
long getNumberOfVertices()
The number of registered vertices. This method provides the number of vertices corresponding to these registered edge segments- Returns:
- number of vertices
-
getNumberOfEdgeSegments
default int getNumberOfEdgeSegments(V vertex, boolean exitSegments)
collect the number of exit or entry edgesegments that are present in the subgraph for the given vertex on the parent graph- Parameters:
vertex
- to verifyexitSegments
- flag, when true check exit segments, when false check entry segments- Returns:
- number of subgraph entry or exit edge segments
-
isEmpty
default boolean isEmpty()
Check if no vertices (and therefore not edge segments are present on this sub graph- Returns:
- true when empty, false otherwise
-
shallowClone
DirectedSubGraph<V,E> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Returns:
- shallow copy of entity
-
deepClone
DirectedSubGraph<V,E> deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
-
-