routing.schedule
Class ScheduleOracle

java.lang.Object
  extended by routing.schedule.ScheduleOracle
All Implemented Interfaces:
java.io.Serializable

public class ScheduleOracle
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
ScheduleOracle()
           
 
Method Summary
 void addEntry(double start, int from, int to, double duration)
          Adds a new schedule entry to the oracle
 void addEntry(double start, int from, int via, int to, double duration)
          Adds a new schedule entry to the oracle
 java.util.List<ScheduleEntry> getConnected(int from, double time)
          Returns a list of schedule entries for nodes reachable after given time from the given node
 java.util.List<ScheduleEntry> getEntries()
          Returns all schedule entries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduleOracle

public ScheduleOracle()
Method Detail

addEntry

public void addEntry(double start,
                     int from,
                     int via,
                     int to,
                     double duration)
Adds a new schedule entry to the oracle

Parameters:
start - Start time
from - Source of the connection
via - The node that goes from "from" to "via" (or -1 for n/a)
to - Destination of the connection
duration - How long it takes to get to destination

addEntry

public void addEntry(double start,
                     int from,
                     int to,
                     double duration)
Adds a new schedule entry to the oracle

Parameters:
start - Start time
from - Source of the connection
to - Destination of the connection
duration - How long it takes to get to destination

getConnected

public java.util.List<ScheduleEntry> getConnected(int from,
                                                  double time)
Returns a list of schedule entries for nodes reachable after given time from the given node

Parameters:
from - The source node
time - Time to start
Returns:
List of reachable nodes

getEntries

public java.util.List<ScheduleEntry> getEntries()
Returns all schedule entries

Returns:
all schedule entries