Package org.goplanit.od.demand
Class OdDemandMatrix
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.od.OdDataImpl<T>
-
- org.goplanit.utils.od.OdMatrixImpl<T,org.ojalgo.array.Array2D<T>>
-
- org.goplanit.utils.od.OdPrimitiveMatrix<Double>
-
- org.goplanit.od.demand.OdDemandMatrix
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOdDemandMatrix.OdDemandMatrixIteratorWrapper 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 OdDemandMatrix(OdDemandMatrix odDemandMatrix)Copy constructorOdDemandMatrix(OdZones zones)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OdDemandMatrixdeepClone()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.OdDemandMatrix.OdDemandMatrixIteratoriterator()Returns an iterator which can iterate through all the origin-destination cells in the matrixvoidmultiply(double factor)Multiply all entries with given factorOdDemandMatrixshallowClone()Create a shallow copy of this entity-
Methods inherited from class org.goplanit.utils.od.OdPrimitiveMatrix
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
-
Methods inherited from interface org.goplanit.od.demand.OdDemands
forEachNonZeroDestinationDemand, forEachNonZeroOdDemand
-
-
-
-
Constructor Detail
-
OdDemandMatrix
public OdDemandMatrix(OdZones zones)
Constructor- Parameters:
zones- holds the zones defined in the network
-
OdDemandMatrix
public OdDemandMatrix(OdDemandMatrix odDemandMatrix)
Copy constructor- Parameters:
odDemandMatrix- to copy
-
-
Method Detail
-
iterator
public OdDemandMatrix.OdDemandMatrixIterator iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrix- Specified by:
iteratorin interfaceIterable<Double>- Specified by:
iteratorin interfaceOdData<Double>- Specified by:
iteratorin interfaceOdMatrix<Double,org.ojalgo.array.Array2D<Double>>- Specified by:
iteratorin classOdPrimitiveMatrix<Double>- Returns:
- iterator through all the origin-destination cells
-
multiply
public void multiply(double factor)
Multiply all entries with given factor
-
shallowClone
public OdDemandMatrix shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein interfaceOdData<Double>- Specified by:
shallowClonein interfaceOdDemands- Specified by:
shallowClonein classOdPrimitiveMatrix<Double>- Returns:
- shallow copy of entity
-
deepClone
public OdDemandMatrix 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
-
-