Package org.goplanit.od.demand
Interface OdDemands
-
- All Known Implementing Classes:
OdDemandMatrix
public interface OdDemands extends OdData<Double>
OdData representing Origin-Destination demands without a specific container reference so a general typed definition of OdDemands can be used for access- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default OdDemands
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.default void
forEachNonZeroDestinationDemand(OdZones odZones, OdZone origin, BiConsumer<OdZone,Double> consumer)
Apply the provided consumer to each destination of the origin provided that has non zero demandsdefault void
forEachNonZeroOdDemand(OdZones odZones, TriConsumer<OdZone,OdZone,Double> consumer)
Apply the provided consumer to each origin-destination combination found that has non zero demandsvoid
multiply(double factor)
Multiply all entries with given factorOdDemands
shallowClone()
Shallow copy-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
multiply
void multiply(double factor)
Multiply all entries with given factor- Parameters:
factor
- to multiply with
-
forEachNonZeroOdDemand
default void forEachNonZeroOdDemand(OdZones odZones, TriConsumer<OdZone,OdZone,Double> consumer)
Apply the provided consumer to each origin-destination combination found that has non zero demands- Parameters:
odZones
- to loop overconsumer
- to apply
-
forEachNonZeroDestinationDemand
default void forEachNonZeroDestinationDemand(OdZones odZones, OdZone origin, BiConsumer<OdZone,Double> consumer)
Apply the provided consumer to each destination of the origin provided that has non zero demands- Parameters:
origin
- to consider destinations forodZones
- to loop destinations overconsumer
- to apply
-
shallowClone
OdDemands shallowClone()
Shallow copy- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceOdData<Double>
- Returns:
- shallow copy
-
deepClone
default OdDemands 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
-
-