All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.raptor.api.model.SearchDirection Maven / Gradle / Ivy

The newest version!
package org.opentripplanner.raptor.api.model;

/**
 * This enum describe the direction which a search is performed.
 * 

* The normal way is to search {@link #FORWARD} from the origin to the destination. *

* Set search direction to {@link #REVERSE} to performed a search from the destination to the * origin. This will traverse the transit graph backwards in time. This is used in Raptor to produce * heuristics, and is normally not something you would like to do unless you are testing or * analyzing. This should not be confused with Range Raptor iterations> which * step-backward-in-time (start with the last minute of the search window), but searches {@link * #FORWARD}. {@link #REVERSE} search is supported by the current implementation of RangeRaptor. *

* In the Raptor code we will refer to the origin and and destination assuming the search direction * is {@link #FORWARD}. */ public enum SearchDirection { /** * Search from origin to destination, forward in time. */ FORWARD, /** * Search from destination to origin, backward in time. */ REVERSE; public boolean isForward() { return this == FORWARD; } public boolean isInReverse() { return this == REVERSE; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy