Package org.goplanit.utils.od
Class OdMatrixImpl<T,U>
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.od.OdDataImpl<T>
-
- org.goplanit.utils.od.OdMatrixImpl<T,U>
-
- All Implemented Interfaces:
Cloneable
,Comparable<IdAble>
,Iterable<T>
,IdAble
,OdData<T>
,OdMatrix<T,U>
- Direct Known Subclasses:
OdNonPrimitiveMatrix
,OdPrimitiveMatrix
public abstract class OdMatrixImpl<T,U> extends OdDataImpl<T> implements OdMatrix<T,U>
This class contains common methods for handling origin-demand matrices.- Author:
- gman6028, markr
-
-
Field Summary
Fields Modifier and Type Field Description protected U
matrixContents
matrix of data values-
Fields inherited from class org.goplanit.utils.od.OdDataImpl
zones
-
-
Constructor Summary
Constructors Constructor Description OdMatrixImpl(Class<? extends IdAble> idTokenClass, IdGroupingToken idToken, OdZones zones, U matrixContents)
Constructor for Od matrix containing primitives, i.e.OdMatrixImpl(OdMatrixImpl<T,U> other)
Copy Constructor (shallow copy of matrix contents)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract OdMatrixImpl<T,U>
clone()
Create a shallow copy of this entityabstract OdMatrixIterator<T,U>
iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrix-
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
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
-
-
-
-
Field Detail
-
matrixContents
protected U matrixContents
matrix of data values
-
-
Constructor Detail
-
OdMatrixImpl
public OdMatrixImpl(Class<? extends IdAble> idTokenClass, IdGroupingToken idToken, OdZones zones, U matrixContents)
Constructor for Od matrix containing primitives, i.e. number based- Parameters:
idTokenClass
- to use for id generationidToken
- to use for the matrix idzones
- holder for zones considered in the matrixmatrixContents
- container for the matrix contents
-
OdMatrixImpl
public OdMatrixImpl(OdMatrixImpl<T,U> other)
Copy Constructor (shallow copy of matrix contents)- Parameters:
other
- to copy
-
-
Method Detail
-
iterator
public abstract OdMatrixIterator<T,U> iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrix
-
clone
public abstract OdMatrixImpl<T,U> clone()
Create a shallow copy of this entity- Specified by:
clone
in interfaceIdAble
- Specified by:
clone
in classOdDataImpl<T>
- Returns:
- shallow copy of entity
-
-