pgRouting

Changeset 140

Show
Ignore:
Timestamp:
03/25/08 15:25:27 (8 months ago)
Author:
anton
Message:

found_goal exception fixed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/core/src/shooting_star_boost_wrapper.cpp

    r136 r140  
    7474 
    7575  template <class Graph> 
    76   void examine_edge(Edge e, Graph& g)  
    77   { 
    78     if( g[e].id == g[m_goal].id
     76  void examine_edge(Edge e, Graph& g, int e_max_id)  
     77  { 
     78    if( g[e].id == g[m_goal].id || g[e].id == g[m_goal].id + e_max_id
    7979    { 
    8080      throw found_goal(); 
     
    8585private: 
    8686  Edge m_goal; 
     87  int e_max_id; 
    8788}; 
    8889 
  • trunk/core/src/shooting_star_search.hpp

    r112 r140  
    8888      vis.discover_vertex(u, g); 
    8989      vis.examine_vertex(u, g); 
    90       vis.examine_edge(e, g); 
     90      vis.examine_edge(e, g, e_max_id); 
    9191      vis.black_target(e, pe, g, e_max_id); 
    9292      vis.gray_target(e, pe, g, e_max_id); 
     
    147147       
    148148      // Examine the edge 
    149       vis.examine_edge(e, g); 
     149      vis.examine_edge(e, g, e_max_id); 
    150150       
    151151      // For all adjacent edges for the current one 
     
    304304      } 
    305305      template <class Edge, class Graph> 
    306       void examine_edge(Edge e, Graph& g)  
     306      void examine_edge(Edge e, Graph& g, int e_max_id)  
    307307      {  
    308308        if (m_compare(get(m_weight, e), m_zero)) 
    309309          throw negative_edge(); 
    310         m_vis.examine_edge(e, g); 
     310        m_vis.examine_edge(e, g, e_max_id); 
    311311      } 
    312312      template <class Edge, class Graph>