Package org.goplanit.od.path
Class OdPathMatrix
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.od.OdDataImpl<T>
-
- org.goplanit.utils.od.OdMatrixImpl<T,T[][]>
-
- org.goplanit.utils.od.OdNonPrimitiveMatrix<ManagedDirectedPath>
-
- org.goplanit.od.path.OdPathMatrix
-
- All Implemented Interfaces:
Comparable<IdAble>,Iterable<ManagedDirectedPath>,OdPaths,IdAble,OdData<ManagedDirectedPath>,OdMatrix<ManagedDirectedPath,ManagedDirectedPath[][]>
public class OdPathMatrix extends OdNonPrimitiveMatrix<ManagedDirectedPath> implements OdPaths
This class stores the path objects from each origin to each destination in a full matrix form- Author:
- gman6028, markr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOdPathMatrix.OdPathMatrixIteratorWrapper around primitive matrix iterator
-
Field Summary
-
Fields inherited from class org.goplanit.utils.od.OdMatrixImpl
matrixContents
-
Fields inherited from class org.goplanit.utils.od.OdDataImpl
zones
-
-
Constructor Summary
Constructors Constructor Description OdPathMatrix(OdPathMatrix other, boolean deepCopy)Copy constructorOdPathMatrix(IdGroupingToken groupId, OdZones zones)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OdPathMatrixdeepClone()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.OdPathMatrix.OdPathMatrixIteratoriterator()Returns an iterator which can iterate through all the origin-destination cells in the matrixOdPathMatrixshallowClone()Create a shallow copy of this entity-
Methods inherited from class org.goplanit.utils.od.OdNonPrimitiveMatrix
getValue, getValue, setValue
-
Methods inherited from class org.goplanit.utils.od.OdDataImpl
getNumberOfOdZones, getOdZones
-
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 java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.goplanit.utils.od.OdData
getNumberOfOdZones, getValue, getValue, setValue
-
-
-
-
Constructor Detail
-
OdPathMatrix
public OdPathMatrix(IdGroupingToken groupId, OdZones zones)
Constructor- Parameters:
groupId- contiguous id generation within this group for instances of this classzones- the zones being used
-
OdPathMatrix
public OdPathMatrix(OdPathMatrix other, boolean deepCopy)
Copy constructor- Parameters:
other- to copy fromdeepCopy- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
iterator
public OdPathMatrix.OdPathMatrixIterator iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrix- Specified by:
iteratorin interfaceIterable<ManagedDirectedPath>- Specified by:
iteratorin interfaceOdData<ManagedDirectedPath>- Specified by:
iteratorin interfaceOdMatrix<ManagedDirectedPath,ManagedDirectedPath[][]>- Specified by:
iteratorin classOdNonPrimitiveMatrix<ManagedDirectedPath>- Returns:
- iterator through all the origin-destination cells
-
shallowClone
public OdPathMatrix shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein interfaceOdData<ManagedDirectedPath>- Specified by:
shallowClonein classOdMatrixImpl<ManagedDirectedPath,ManagedDirectedPath[][]>- Returns:
- shallow copy of entity
-
deepClone
public OdPathMatrix 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:
deepClonein interfaceIdAble- Specified by:
deepClonein classOdMatrixImpl<ManagedDirectedPath,ManagedDirectedPath[][]>- Returns:
- deep copy of entity
-
-