public class PathDiscardingRaptorStateStore extends Object implements RaptorStateStore
| Modifier and Type | Field and Description |
|---|---|
gnu.trove.map.TObjectIntMap<TransitStop> |
bestStops
The best time to reach each stop in any round by transit only, not by transfer from another stop.
|
int |
maxTime
The maximum acceptable clock time in seconds since midnight.
|
| Constructor and Description |
|---|
PathDiscardingRaptorStateStore(int rounds)
Create a new store with the given number of rounds.
|
PathDiscardingRaptorStateStore(int rounds,
int maxTime) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPrev(TransitStop t)
get the best time for a given stop after the last round, including transfers
|
int |
getTime(TransitStop t)
get the best time for a given stop that was reached by transit (not by transfers)
|
Collection<TransitStop> |
getTouchedStopsIncludingTransfers()
get all the stops that were reached in the current round, either via transfers or directly
|
gnu.trove.iterator.TObjectIntIterator<TransitStop> |
iterator()
get an iterator over the states of this store
|
void |
proceed()
Proceed to the next round
|
boolean |
put(TransitStop t,
int time,
boolean transfer)
Add a state to this store, with the given clock time (seconds since midnight)
|
void |
restart()
Restart the search from the first round.
|
public gnu.trove.map.TObjectIntMap<TransitStop> bestStops
public int maxTime
public PathDiscardingRaptorStateStore(int rounds)
public PathDiscardingRaptorStateStore(int rounds,
int maxTime)
public boolean put(TransitStop t, int time, boolean transfer)
RaptorStateStoreput in interface RaptorStateStorepublic void proceed()
RaptorStateStoreproceed in interface RaptorStateStorepublic int getTime(TransitStop t)
RaptorStateStoregetTime in interface RaptorStateStorepublic int getPrev(TransitStop t)
RaptorStateStoregetPrev in interface RaptorStateStorepublic void restart()
public gnu.trove.iterator.TObjectIntIterator<TransitStop> iterator()
RaptorStateStoreiterator in interface RaptorStateStorepublic Collection<TransitStop> getTouchedStopsIncludingTransfers()
RaptorStateStoregetTouchedStopsIncludingTransfers in interface RaptorStateStoreCopyright © 2018. All rights reserved.