Esempio n. 1
0
 public GraphCore(FlowData data, ReferenceData refData, IHaversine haversine)
 {
     Haversine = haversine;
     fd        = data;
     rd        = refData;
     HydrateGraph();
 }
Esempio n. 2
0
 public int Distance = 0; //Weight = distance in km
 public Edge(Node src, Node dst, IHaversine haversine)
 {
     Source      = src;
     Destination = dst;
     //Distance = (int)(src.Location.GetDistanceTo(dst.Location)); // Put it back later! GeoCoordinates is fun, look into course as heuristic during search.
     //Casting because the extra precision isn't necessary... it might be now...
     Distance = (int)haversine.Distance(src.Location, dst.Location, DistanceType.Kilometers);
 }
Esempio n. 3
0
        public GraphHandler(IHaversine haversine)
        {
            DataParser x = new DataParser();

            Data = x.Flow();

            ReferenceParser refParser = new ReferenceParser();

            RefData = refParser.Flow();
            string directoryPath = @"C:\netProjects\AirlineGraph\shortestPaths";
            var    data          = System.IO.Directory.GetFiles(directoryPath);

            MetaParser metaParser = new MetaParser();

            Meta = metaParser.Flow();

            GraphCore = new GraphCore(Data, RefData, haversine);
        }
Esempio n. 4
0
 public GL_SP_Route_Graph(IHaversine haversine)
 {
     Graph = new Graph(haversine);
 }
Esempio n. 5
0
 public Graph(IHaversine haversine)
 {
     GraphHandler = new GraphHandler(haversine);
 }
Esempio n. 6
0
 public Node(string code3, IHaversine haversine)
 {
     Code3     = code3;
     Haversine = haversine;
 }