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)
RaptorStateStore
put
in interface RaptorStateStore
public void proceed()
RaptorStateStore
proceed
in interface RaptorStateStore
public int getTime(TransitStop t)
RaptorStateStore
getTime
in interface RaptorStateStore
public int getPrev(TransitStop t)
RaptorStateStore
getPrev
in interface RaptorStateStore
public void restart()
public gnu.trove.iterator.TObjectIntIterator<TransitStop> iterator()
RaptorStateStore
iterator
in interface RaptorStateStore
public Collection<TransitStop> getTouchedStopsIncludingTransfers()
RaptorStateStore
getTouchedStopsIncludingTransfers
in interface RaptorStateStore
Copyright © 2018. All rights reserved.