Package org.planit.od.odroute
Class ODRouteMatrix
- java.lang.Object
-
- org.planit.od.ODDataImpl<Route>
-
- org.planit.od.odroute.ODRouteMatrix
-
public class ODRouteMatrix extends ODDataImpl<Route>
This class stores the route 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 ODRouteMatrix(IdGroupingToken groupId, Zoning.Zones zones)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getId()
Route
getValue(Zone origin, Zone destination)
Returns the path for a specified origin and destinationODRouteIterator
iterator()
Returns an iterator which can iterate through all the origin-destination cells in the matrixvoid
setValue(Zone origin, Zone destination, Route path)
Set the path from a specified origin to a specified destination-
Methods inherited from class org.planit.od.ODDataImpl
getNumberOfTravelAnalysisZones
-
-
-
-
Constructor Detail
-
ODRouteMatrix
public ODRouteMatrix(IdGroupingToken groupId, Zoning.Zones zones)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this classzones
- the zones being used
-
-
Method Detail
-
getValue
public Route 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, Route 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 ODRouteIterator 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 route od route matrix instance
-
-