Package org.goplanit.graph
Class ConjugateGraphImpl<V extends ConjugateVertex,E extends ConjugateEdge>
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.graph.UntypedGraphImpl<V,E>
-
- org.goplanit.graph.ConjugateGraphImpl<V,E>
-
- All Implemented Interfaces:
Comparable<IdAble>
,Graph<V,E>
,UntypedGraph<V,E>
,IdAble
,ManagedId
public class ConjugateGraphImpl<V extends ConjugateVertex,E extends ConjugateEdge> extends UntypedGraphImpl<V,E> implements Graph<V,E>
A conjugate graph implementation consisting of conjugate vertices and conjugate edges- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.graph.UntypedGraphImpl
edges, vertices
-
Fields inherited from interface org.goplanit.utils.graph.UntypedGraph
GRAPH_ID_CLASS
-
-
Constructor Summary
Constructors Constructor Description ConjugateGraphImpl(ConjugateGraphImpl<V,E> other, boolean deepCopy, GraphEntityDeepCopyMapper<V> conjVertexMapper, GraphEntityDeepCopyMapper<E> conjEdgeMapper)
Copy constructorConjugateGraphImpl(IdGroupingToken groupId, GraphEntities<V> conjugateVertices, GraphEntities<E> conjugateEdges)
Graph Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateGraphImpl<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.ConjugateGraphImpl<V,E>
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.graph.UntypedGraphImpl
generatedGraphId, getEdges, getGraphIdGroupingToken, getIdClass, getVertices, recreateManagedIds, smartDeepClone
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
getIdClass, recreateManagedIds, resetChildManagedIdEntities
-
Methods inherited from interface org.goplanit.utils.graph.UntypedGraph
getEdges, getVertices, isEmpty, transformGeometries, validate
-
-
-
-
Constructor Detail
-
ConjugateGraphImpl
public ConjugateGraphImpl(IdGroupingToken groupId, GraphEntities<V> conjugateVertices, GraphEntities<E> conjugateEdges)
Graph Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this classconjugateVertices
- to useconjugateEdges
- to use
-
ConjugateGraphImpl
public ConjugateGraphImpl(ConjugateGraphImpl<V,E> other, boolean deepCopy, GraphEntityDeepCopyMapper<V> conjVertexMapper, GraphEntityDeepCopyMapper<E> conjEdgeMapper)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwiseconjVertexMapper
- tracking how original vertices are mapped to new vertices in case of deep copyconjEdgeMapper
- tracking how original edges are mapped to new edges in case of deep copy
-
-
Method Detail
-
shallowClone
public ConjugateGraphImpl<V,E> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceUntypedGraph<V extends ConjugateVertex,E extends ConjugateEdge>
- Overrides:
shallowClone
in classUntypedGraphImpl<V extends ConjugateVertex,E extends ConjugateEdge>
- Returns:
- shallow copy of entity
-
deepClone
public ConjugateGraphImpl<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 For conjugate graphs we also update the known interdependencies between its entities- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in interfaceUntypedGraph<V extends ConjugateVertex,E extends ConjugateEdge>
- Overrides:
deepClone
in classUntypedGraphImpl<V extends ConjugateVertex,E extends ConjugateEdge>
- Returns:
- deep copy of entity
-
-