Package org.planit.graph
Class DirectedGraphImpl<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment>
- java.lang.Object
- 
- org.planit.graph.GraphImpl<V,E>
- 
- org.planit.graph.DirectedGraphImpl<V,E,ES>
 
 
- 
- All Implemented Interfaces:
- GraphModifier<V,E>,- DirectedGraph<V,E,ES>,- Graph<V,E>
 
 public class DirectedGraphImpl<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment> extends GraphImpl<V,E> implements DirectedGraph<V,E,ES> A graph implementation consisting of vertices and edges- Author:
- markr
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected EdgeSegments<ES>edgeSegmentsclass instance containing all edge segments- 
Fields inherited from class org.planit.graph.GraphImpledges, graphBuilder, vertices
 
- 
 - 
Constructor SummaryConstructors Constructor Description DirectedGraphImpl(IdGroupingToken groupToken, DirectedGraphBuilder<V,E,ES> graphBuilder)DirectedGraph Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Long,Set<E>>breakEdgesAt(List<? extends E> edgesToBreak, V vertexToBreakAt)Identical to theGraphImplimplementation except that we now also account for the edge segments present on the edge.EdgeSegments<ES>getEdgeSegments()Collect edges segments of graphvoidrecreateIds()Identical to GraphImpl.recreateIds() except that now the ids of the edge segments are also recreated on top of the vertices and edgesvoidremoveSubGraph(Set<? extends V> subNetworkToRemove, boolean recreateIds)remove the subgraph identified by the passed in vertices- 
Methods inherited from class org.planit.graph.GraphImplgetEdges, getGraphIdGroupingToken, getId, getVertices, processSubNetworkVertex, removeDanglingSubGraphs, removeSubGraphOf
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.planit.utils.graph.DirectedGraphtransformGeometries, validate
 - 
Methods inherited from interface org.planit.utils.graph.GraphgetEdges, getId, getVertices
 - 
Methods inherited from interface org.planit.graph.GraphModifierremoveDanglingSubGraphs
 
- 
 
- 
- 
- 
Field Detail- 
edgeSegmentsprotected final EdgeSegments<ES extends EdgeSegment> edgeSegments class instance containing all edge segments
 
- 
 - 
Constructor Detail- 
DirectedGraphImplpublic DirectedGraphImpl(IdGroupingToken groupToken, DirectedGraphBuilder<V,E,ES> graphBuilder) DirectedGraph Constructor- Parameters:
- groupToken- contiguous id generation within this group for instances of this class
- graphBuilder- the builder to be used to create this network
 
 
- 
 - 
Method Detail- 
getEdgeSegmentspublic EdgeSegments<ES> getEdgeSegments() Collect edges segments of graph- Specified by:
- getEdgeSegmentsin interface- DirectedGraph<V extends DirectedVertex,E extends DirectedEdge,ES extends EdgeSegment>
- Returns:
- edges segments
 
 - 
removeSubGraphpublic void removeSubGraph(Set<? extends V> subNetworkToRemove, boolean recreateIds) remove the subgraph identified by the passed in vertices- Specified by:
- removeSubGraphin interface- GraphModifier<V extends DirectedVertex,E extends DirectedEdge>
- Overrides:
- removeSubGraphin class- GraphImpl<V extends DirectedVertex,E extends DirectedEdge>
- Parameters:
- subNetworkToRemove- the one to remove
- recreateIds- indicate if the ids of the graph entities are to be recreated, if false gaps will occur so it is expected to be handled by the user afterwards in this case
 
 - 
recreateIdspublic void recreateIds() Identical to GraphImpl.recreateIds() except that now the ids of the edge segments are also recreated on top of the vertices and edges- Specified by:
- recreateIdsin interface- GraphModifier<V extends DirectedVertex,E extends DirectedEdge>
- Overrides:
- recreateIdsin class- GraphImpl<V extends DirectedVertex,E extends DirectedEdge>
 
 - 
breakEdgesAtpublic Map<Long,Set<E>> breakEdgesAt(List<? extends E> edgesToBreak, V vertexToBreakAt) throws PlanItException Identical to theGraphImplimplementation except that we now also account for the edge segments present on the edge. Copies of the original edge segments are placed on (vertexToBreakAt,vertexB), while the original ones are retained at (vertexA,vertexToBreakAt)- Specified by:
- breakEdgesAtin interface- GraphModifier<V extends DirectedVertex,E extends DirectedEdge>
- Overrides:
- breakEdgesAtin class- GraphImpl<V extends DirectedVertex,E extends DirectedEdge>
- Parameters:
- edgesToBreak- edges to break
- vertexToBreakAt- the vertex to break at
- Returns:
- affected edges of breaking the passed in edges, includes the newly created edges and modified existing edges
- Throws:
- PlanItException- thrown if error
 
 
- 
 
-