public GraphCore(FlowData data, ReferenceData refData, IHaversine haversine) { Haversine = haversine; fd = data; rd = refData; HydrateGraph(); }
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); }
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); }
public GL_SP_Route_Graph(IHaversine haversine) { Graph = new Graph(haversine); }
public Graph(IHaversine haversine) { GraphHandler = new GraphHandler(haversine); }
public Node(string code3, IHaversine haversine) { Code3 = code3; Haversine = haversine; }