Package org.goplanit.utils.od
Interface OdData<T>
-
- Type Parameters:
T- the type of data to be stored for each origin-destination cell
- All Superinterfaces:
Cloneable,Comparable<IdAble>,IdAble,Iterable<T>
- All Known Implementing Classes:
OdDataImpl,OdDemandMatrix,OdHashedImpl,OdMatrixImpl,OdNonPrimitiveMatrix,OdPathMatrix,OdPathsHashed,OdPrimitiveMatrix,OdSkimMatrix
public interface OdData<T> extends IdAble, Iterable<T>, Cloneable
Interface defining methods for objects which store data related to origin and destination- Author:
- gman6028
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetNumberOfOdZones()Returns the number of zones contained in the objectTgetValue(long originId, long destinationId)Returns the value for a specified origin and destination by their internal idTgetValue(Zone origin, Zone destination)Returns the value for a specified origin and destinationOdDataIterator<T>iterator()Returns an iterator which can iterate through all the origin-destination cellsvoidsetValue(Zone origin, Zone destination, T value)Sets the value for a specified origin and destination-
Methods inherited from interface org.goplanit.utils.id.IdAble
clone, compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getValue
T getValue(Zone origin, Zone destination)
Returns the value for a specified origin and destination- Parameters:
origin- specified origindestination- specified destination- Returns:
- value at the specified cell
-
getValue
T getValue(long originId, long destinationId)
Returns the value for a specified origin and destination by their internal id- Parameters:
originId- specified origindestinationId- specified destination- Returns:
- value at the specified cell
-
setValue
void setValue(Zone origin, Zone destination, T value)
Sets the value for a specified origin and destination- Parameters:
origin- specified origindestination- specified destinationvalue- value at the specified cell
-
getNumberOfOdZones
int getNumberOfOdZones()
Returns the number of zones contained in the object- Returns:
- number of zones in the object
-
iterator
OdDataIterator<T> iterator()
Returns an iterator which can iterate through all the origin-destination cells
-
-