C# Class Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.Routes

Manages a routes from a city to another city.
Inheritance: IRoutes
Afficher le fichier Open project: platzhersh/FHNW-Java-Projekte Class Usage Examples

Protected Properties

Свойство Type Description
cities Cities
routes List

Méthodes publiques

Méthode Description
FindCities ( TransportModes tmode ) : Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.City[]
FindCitiesBetween ( string fromName, string toName ) : List

Find all cities between 2 cities

FindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode ) : List
FindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress = null ) : List

Calculates and returns the shortest route between the passed cities.

FindShortestRouteBetweenAsync ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress ) : Task>
GoFindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress = null ) : Task>
ReadRoutes ( string filename ) : int

Reads a list of links from the given file. Reads only links where the cities exist.

Routes ( Cities cities ) : System.Diagnostics

Initializes the Routes with the cities.

Méthodes protégées

Méthode Description
FindLink ( City c1, City c2, TransportModes t ) : Link

Finds the link between two cities.

FindPath ( List citiesOnRoute, TransportModes mode ) : List
NotifyObservers ( string fromCity, string toCity, TransportModes mode ) : void

Private Methods

Méthode Description
FindNeighbours ( City city, TransportModes mode ) : List

Finds all neighbor cities of a city.

GetCitiesOnRoute ( City source, City target, City>.Dictionary previous ) : List
SearchShortestPath ( TransportModes mode, List q, double>.Dictionary dist, City>.Dictionary previous ) : City>.Dictionary

Searches the shortest path for cities and the given links

Method Details

FindCities() public méthode

public FindCities ( TransportModes tmode ) : Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.City[]
tmode TransportModes
Résultat Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.City[]

FindCitiesBetween() public méthode

Find all cities between 2 cities
public FindCitiesBetween ( string fromName, string toName ) : List
fromName string source city
toName string target city
Résultat List

FindLink() protected méthode

Finds the link between two cities.
protected FindLink ( City c1, City c2, TransportModes t ) : Link
c1 City first city
c2 City second city
t TransportModes
Résultat Link

FindPath() protected méthode

protected FindPath ( List citiesOnRoute, TransportModes mode ) : List
citiesOnRoute List
mode TransportModes
Résultat List

FindShortestRouteBetween() public méthode

public FindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode ) : List
fromCity string
toCity string
mode TransportModes
Résultat List

FindShortestRouteBetween() public abstract méthode

Calculates and returns the shortest route between the passed cities.
public abstract FindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress = null ) : List
fromCity string
toCity string
mode TransportModes
reportProgress IProgress
Résultat List

FindShortestRouteBetweenAsync() public méthode

public FindShortestRouteBetweenAsync ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress ) : Task>
fromCity string
toCity string
mode TransportModes
reportProgress IProgress
Résultat Task>

GoFindShortestRouteBetween() public méthode

public GoFindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress = null ) : Task>
fromCity string
toCity string
mode TransportModes
reportProgress IProgress
Résultat Task>

NotifyObservers() protected méthode

protected NotifyObservers ( string fromCity, string toCity, TransportModes mode ) : void
fromCity string
toCity string
mode TransportModes
Résultat void

ReadRoutes() public méthode

Reads a list of links from the given file. Reads only links where the cities exist.
public ReadRoutes ( string filename ) : int
filename string name of links file
Résultat int

Routes() public méthode

Initializes the Routes with the cities.
public Routes ( Cities cities ) : System.Diagnostics
cities Cities
Résultat System.Diagnostics

Property Details

cities protected_oe property

protected Cities,Fhnw.Ecnf.RoutePlanner.RoutePlannerLib cities
Résultat Cities

routes protected_oe property

protected List routes
Résultat List