Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8429


Ignore:
Timestamp:
08/08/12 13:40:03 (12 years ago)
Author:
spimming
Message:

#1894

  • renamed Graph to OsmGraph
  • generic type in edge interface
Location:
branches/RoutePlanning
Files:
1 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • branches/RoutePlanning/HeuristicLab.Algorithms.GraphRouting/3.3/AStarAlgorithm.cs

    r8362 r8429  
    55namespace HeuristicLab.Algorithms.GraphRouting {
    66  public class AStarAlgorithm : IRouter {
    7     private Graph graph;
     7    private OsmGraph graph;
    88
    99    private Dictionary<long, float> distances;
     
    1414    private PriorityQueue<float, long> openList;
    1515
    16     public AStarAlgorithm(Graph graph) {
     16    public AStarAlgorithm(OsmGraph graph) {
    1717      this.graph = graph;
    1818    }
  • branches/RoutePlanning/HeuristicLab.Algorithms.GraphRouting/3.3/AStarAlgorithmV2.cs

    r8426 r8429  
    55namespace HeuristicLab.Algorithms.GraphRouting {
    66  public class AStarAlgorithmV2 : IRouter {
    7     private Graph graph;
     7    private OsmGraph graph;
    88
    99    private Dictionary<long, float> distances;
     
    1414    private Dictionary<long, NodeData> openListLookup;
    1515
    16     public AStarAlgorithmV2(Graph graph) {
     16    public AStarAlgorithmV2(OsmGraph graph) {
    1717      this.graph = graph;
    1818    }
  • branches/RoutePlanning/HeuristicLab.Algorithms.GraphRouting/3.3/BidirectionalDijkstraAlgorithm.cs

    r8423 r8429  
    55namespace HeuristicLab.Algorithms.GraphRouting {
    66  public class BidrectionalDijkstraAlgorithm : IRouter {
    7     private Graph graph;
     7    private OsmGraph graph;
    88
    99    private HashSet<long> visitedNodesForward;
     
    1616    private Dictionary<long, long> predecessorsBackward;
    1717
    18     public BidrectionalDijkstraAlgorithm(Graph graph) {
     18    public BidrectionalDijkstraAlgorithm(OsmGraph graph) {
    1919      this.graph = graph;
    2020    }
  • branches/RoutePlanning/HeuristicLab.Algorithms.GraphRouting/3.3/DijkstraAlgorithm.cs

    r8314 r8429  
    55namespace HeuristicLab.Algorithms.GraphRouting {
    66  public class DijkstraAlgorithm : IRouter {
    7     private Graph graph;
     7    private OsmGraph graph;
    88
    99    private HashSet<long> visitedNodes;
     
    1212    private Dictionary<long, long> predecessors;
    1313
    14     public DijkstraAlgorithm(Graph graph) {
     14    public DijkstraAlgorithm(OsmGraph graph) {
    1515      this.graph = graph;
    1616    }
  • branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning.Test/Program.cs

    r8426 r8429  
    2323
    2424      IDataSource ds = TestLoad(file6);
    25       Graph.Graph graph = new Graph.Graph(ds);
    26       TestRouter(new DijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
    27       TestRouter(new AStarAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
     25      OsmGraph graph = new OsmGraph(ds);
     26      //TestRouter(new DijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
     27      //TestRouter(new AStarAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
    2828      TestRouter(new AStarAlgorithmV2(graph), 529102170, 31372732, false); // inz - hgb
    29       TestRouter(new BidrectionalDijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
     29      //TestRouter(new BidrectionalDijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
    3030
    3131      //TestLoadAndRouter(file6, typeof(DijkstraAlgorithm), 529102170, 31372732, false, false); // inz - hgb
     
    9696      Console.WriteLine("Loading Time: {0}", sw.Elapsed);
    9797      Console.WriteLine();
    98       Graph.Graph graph = new Graph.Graph(xmlDs);
     98      OsmGraph graph = new OsmGraph(xmlDs);
    9999      IRouter router = (IRouter)Activator.CreateInstance(routerType, graph);
    100100      Console.Write("Calculate route ... ");
     
    122122    }
    123123
    124     private static void WriteGPXFile(Graph.Graph graph, long[] route, string file) {
     124    private static void WriteGPXFile(OsmGraph graph, long[] route, string file) {
    125125      XmlWriterSettings settings = new XmlWriterSettings();
    126126      settings.Indent = true;
  • branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/IEdge.cs

    r8300 r8429  
    11
    22namespace HeuristicLab.Problems.RoutePlanning.Graph {
    3   public interface IEdge<Vertex> {
    4     Vertex Source { get; }
    5     Vertex Target { get; }
     3  public interface IEdge<T> {
     4    T Source { get; }
     5    T Target { get; }
    66  }
    77}
  • branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/HeuristicLab.Problems.RoutePlanning.csproj

    r8408 r8429  
    5757  <ItemGroup>
    5858    <Compile Include="Graph\Edge.cs" />
    59     <Compile Include="Graph\Graph.cs" />
     59    <Compile Include="Graph\OsmGraph.cs" />
    6060    <Compile Include="Graph\IEdge.cs" />
    6161    <Compile Include="Graph\Route.cs" />
  • branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutePlanningProblem.cs

    r8301 r8429  
    2727using HeuristicLab.Parameters;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Problems.RoutePlanning.Graph;
    2930using HeuristicLab.Problems.RoutePlanning.Osm;
    3031using HeuristicLab.Problems.RoutePlanning.Osm.Data;
     
    4142
    4243    IDataSource dataSource;
    43     Graph.Graph graph;
     44    OsmGraph graph;
    4445
    4546    #region Parameter Properties
     
    105106      FileInfo f = new FileInfo(file);
    106107      dataSource = new XmlDataSource(file);
    107       graph = new Graph.Graph(dataSource);
     108      graph = new OsmGraph(dataSource);
    108109
    109110      Name = f.Name;
  • branches/RoutePlanning/RoutePlanning.sln

    r8350 r8429  
    99EndProject
    1010Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.GraphRouting", "HeuristicLab.Algorithms.GraphRouting\3.3\HeuristicLab.Algorithms.GraphRouting.csproj", "{4FE72407-6CAA-4F41-9F2D-D45FDA19ED3C}"
     11EndProject
     12Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9FD7CBFA-D7D9-4FA3-9038-CD867CA9B3B6}"
    1113EndProject
    1214Global
Note: See TracChangeset for help on using the changeset viewer.