Class ConjugateACyclicSubGraphImpl
- java.lang.Object
-
- org.goplanit.graph.directed.acyclic.UntypedACyclicSubGraphImpl<ConjugateDirectedVertex,ConjugateEdgeSegment>
-
- org.goplanit.graph.directed.acyclic.ConjugateACyclicSubGraphImpl
-
- All Implemented Interfaces:
Comparable<IdAble>
,Iterable<ConjugateDirectedVertex>
,ConjugateACyclicSubGraph
,UntypedACyclicSubGraph<ConjugateDirectedVertex,ConjugateEdgeSegment>
,DirectedSubGraph<ConjugateDirectedVertex,ConjugateEdgeSegment>
,IdAble
public class ConjugateACyclicSubGraphImpl extends UntypedACyclicSubGraphImpl<ConjugateDirectedVertex,ConjugateEdgeSegment> implements ConjugateACyclicSubGraph
An acyclic sub graph contains a subset of the full graph without cycles. The active subset of the graph is tracked by explicitly registering edge segments. Edge segments are by definition directed.- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description ConjugateACyclicSubGraphImpl(ConjugateACyclicSubGraphImpl other, boolean deepCopy)
Copy constructorConjugateACyclicSubGraphImpl(IdGroupingToken groupId, ConjugateDirectedVertex rootVertex, boolean invertedDirection, int numberOfConjugateEdgeSegments)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateACyclicSubGraphImpl
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.ConjugateACyclicSubGraphImpl
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.graph.directed.acyclic.UntypedACyclicSubGraphImpl
addEdgeSegment, addRootVertex, containsEdgeSegment, getId, getNumberOfVertices, getRootVertices, getVertexData, isDirectionInverted, iterator, postVisit, preVisit, removeEdgeSegment, topologicalSort
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.graph.directed.DirectedSubGraph
addEdgeSegment, containsEdgeSegment, getNumberOfEdgeSegments, getNumberOfVertices, isEmpty, removeEdgeSegment
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.graph.directed.acyclic.UntypedACyclicSubGraph
addRootVertex, getRootVertices, getTopologicalIterator, getTopologicalIterator, isDirectionInverted, topologicalSort
-
-
-
-
Constructor Detail
-
ConjugateACyclicSubGraphImpl
public ConjugateACyclicSubGraphImpl(IdGroupingToken groupId, ConjugateDirectedVertex rootVertex, boolean invertedDirection, int numberOfConjugateEdgeSegments)
Constructor. It is expected that all provided root vertices represent edges in the orignal network leading to a single root.- Parameters:
groupId
- generate id based on the group it resides inrootVertex
- the root verticex of the conjugate bush which can be the end or starting point depending whether or not direction is inverted.invertedDirection
- when true dag ends at root and all other vertices precede it, when false the root is the starting point and all other vertices succeed itnumberOfConjugateEdgeSegments
- number of conjugate directed edge segments of the parent this subgraph is a subset from
-
ConjugateACyclicSubGraphImpl
public ConjugateACyclicSubGraphImpl(ConjugateACyclicSubGraphImpl other, boolean deepCopy)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
shallowClone
public ConjugateACyclicSubGraphImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceConjugateACyclicSubGraph
- Specified by:
shallowClone
in interfaceDirectedSubGraph<ConjugateDirectedVertex,ConjugateEdgeSegment>
- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceUntypedACyclicSubGraph<ConjugateDirectedVertex,ConjugateEdgeSegment>
- Overrides:
shallowClone
in classUntypedACyclicSubGraphImpl<ConjugateDirectedVertex,ConjugateEdgeSegment>
- Returns:
- shallow copy of entity
-
deepClone
public ConjugateACyclicSubGraphImpl 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- Specified by:
deepClone
in interfaceConjugateACyclicSubGraph
- Specified by:
deepClone
in interfaceDirectedSubGraph<ConjugateDirectedVertex,ConjugateEdgeSegment>
- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in interfaceUntypedACyclicSubGraph<ConjugateDirectedVertex,ConjugateEdgeSegment>
- Overrides:
deepClone
in classUntypedACyclicSubGraphImpl<ConjugateDirectedVertex,ConjugateEdgeSegment>
- Returns:
- deep copy of entity
-
-