C# 클래스 Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.Routes

Manages a routes from a city to another city.
상속: IRoutes
파일 보기 프로젝트 열기: platzhersh/FHNW-Java-Projekte 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
cities Cities
routes List

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
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

메소드 상세

FindCities() 공개 메소드

public FindCities ( TransportModes tmode ) : Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.City[]
tmode TransportModes
리턴 Fhnw.Ecnf.RoutePlanner.RoutePlannerLib.City[]

FindCitiesBetween() 공개 메소드

Find all cities between 2 cities
public FindCitiesBetween ( string fromName, string toName ) : List
fromName string source city
toName string target city
리턴 List

FindLink() 보호된 메소드

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
리턴 Link

FindPath() 보호된 메소드

protected FindPath ( List citiesOnRoute, TransportModes mode ) : List
citiesOnRoute List
mode TransportModes
리턴 List

FindShortestRouteBetween() 공개 메소드

public FindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode ) : List
fromCity string
toCity string
mode TransportModes
리턴 List

FindShortestRouteBetween() 공개 추상적인 메소드

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
리턴 List

FindShortestRouteBetweenAsync() 공개 메소드

public FindShortestRouteBetweenAsync ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress ) : Task>
fromCity string
toCity string
mode TransportModes
reportProgress IProgress
리턴 Task>

GoFindShortestRouteBetween() 공개 메소드

public GoFindShortestRouteBetween ( string fromCity, string toCity, TransportModes mode, IProgress reportProgress = null ) : Task>
fromCity string
toCity string
mode TransportModes
reportProgress IProgress
리턴 Task>

NotifyObservers() 보호된 메소드

protected NotifyObservers ( string fromCity, string toCity, TransportModes mode ) : void
fromCity string
toCity string
mode TransportModes
리턴 void

ReadRoutes() 공개 메소드

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
리턴 int

Routes() 공개 메소드

Initializes the Routes with the cities.
public Routes ( Cities cities ) : System.Diagnostics
cities Cities
리턴 System.Diagnostics

프로퍼티 상세

cities 보호되어 있는 프로퍼티

protected Cities,Fhnw.Ecnf.RoutePlanner.RoutePlannerLib cities
리턴 Cities

routes 보호되어 있는 프로퍼티

protected List routes
리턴 List