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 class
OdDemandMatrix.OdDemandMatrixIterator
Wrapper 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 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.OdDemandMatrix.OdDemandMatrixIterator
iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrixvoid
multiply(double factor)
Multiply all entries with given factorOdDemandMatrix
shallowClone()
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:
iterator
in interfaceIterable<Double>
- Specified by:
iterator
in interfaceOdData<Double>
- Specified by:
iterator
in interfaceOdMatrix<Double,org.ojalgo.array.Array2D<Double>>
- Specified by:
iterator
in 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:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceOdData<Double>
- Specified by:
shallowClone
in interfaceOdDemands
- Specified by:
shallowClone
in 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
-
-