C# Class TheAirline.Models.Passengers.PassengerRouteFinder

Mostra file Open project: TheAirlineProject/tap-desktop

Public Methods

Method Description
CalculateDistance ( Airport start ) : void

Calculates the distance from the start airport to all other airports

GetNodeWithSmallestDistance ( ) : Airport

Returns the airport with the smallest distance

GetPathTo ( Airport d ) : List

Gets the path to an airport

PassengerRouteFinder ( List nodes ) : System.Collections.Generic

Constructor

Private Methods

Method Description
GetNeighbors ( Airport n ) : IEnumerable

Returns all airports with a route from the an airport

getDistanceBetween ( Airport o, Airport d ) : double

Returns the distance between two airports

Method Details

CalculateDistance() public method

Calculates the distance from the start airport to all other airports
public CalculateDistance ( Airport start ) : void
start TheAirline.Models.Airports.Airport Startknoten
return void

GetNodeWithSmallestDistance() public method

Returns the airport with the smallest distance
public GetNodeWithSmallestDistance ( ) : Airport
return TheAirline.Models.Airports.Airport

GetPathTo() public method

Gets the path to an airport
public GetPathTo ( Airport d ) : List
d TheAirline.Models.Airports.Airport /// Destination ///
return List

PassengerRouteFinder() public method

Constructor
public PassengerRouteFinder ( List nodes ) : System.Collections.Generic
nodes List All airports
return System.Collections.Generic