Package org.planit.od.odpath
Class ODPathMatrix
- java.lang.Object
-
- org.planit.od.ODDataImpl<Path>
-
- org.planit.od.odpath.ODPathMatrix
-
public class ODPathMatrix extends ODDataImpl<Path>
This class stores the path objects from each origin to each destination.- Author:
- gman6028
-
-
Field Summary
Fields Modifier and Type Field Description protected long
id
Unique identifier-
Fields inherited from class org.planit.od.ODDataImpl
zones
-
-
Constructor Summary
Constructors Constructor Description ODPathMatrix(IdGroupingToken groupId, Zones<?> zones)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getId()
Path
getValue(Zone origin, Zone destination)
Returns the path for a specified origin and destinationODPathIterator
iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrixvoid
setValue(Zone origin, Zone destination, Path path)
Set the path from a specified origin to a specified destination-
Methods inherited from class org.planit.od.ODDataImpl
getNumberOfTravelAnalysisZones
-
-
-
-
Constructor Detail
-
ODPathMatrix
public ODPathMatrix(IdGroupingToken groupId, Zones<?> zones)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this classzones
- the zones being used
-
-
Method Detail
-
getValue
public Path getValue(Zone origin, Zone destination)
Returns the path for a specified origin and destination- Parameters:
origin
- the specified origin zonedestination
- the specified destination zone- Returns:
- the path from the origin to the destination
-
setValue
public void setValue(Zone origin, Zone destination, Path path)
Set the path from a specified origin to a specified destination- Parameters:
origin
- the specified origin zonedestination
- the specified destination zonepath
- the Path object from the origin to the destination
-
iterator
public ODPathIterator iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrix- Returns:
- iterator through all the origin-destination cells
-
getId
public long getId()
- Returns:
- unique identifier of this od pathmatrix instance
-
-