← Back to team overview

oqgraph-dev team mailing list archive

Commended code; was Re: Changes finalised hopefully; need test suite assistance

 

Hi Arjen,

There are two #if 0'd sections in graphcore.cc

(Working in reverse)


The second of these sections appears to be a slightly different version of the
same code.  I extracted these out, here is the diff, it appears to be a
directional ordering thing, maybe the current version is a correction?

<       case DIJKSTRAS | HAVE_ORIG:
<       case BREADTH_FIRST | HAVE_ORIG:
---
> #if 0
>
>       case BREADTH_FIRST | HAVE_DEST:
>       case DIJKSTRAS | HAVE_DEST:
8,9c10,12
<           p[ *orig ]= *orig;
<           d[ *orig ] = EdgeWeight();
---
>           reverse_graph<Graph> r(share->g);
>           p[ *dest ]= *dest;
>           d[ *dest ] = EdgeWeight();
13c16
<             dijkstra_shortest_paths_no_init(share->g, *orig,
---
>             dijkstra_shortest_paths_no_init(share->g, *dest,
23,25c26,31
<                     make_oqgraph_visit_dist(
<                         boost::make_assoc_property_map(p), d,
<                         static_cast<stack_cursor*>(cursor)
---
>                     make_dijkstra_visitor(
>                         make_oqgraph_visit_dist(
>                             boost::make_assoc_property_map(p),
>                             boost::make_assoc_property_map(d),
>                             static_cast<stack_cursor*>(cursor)
>                         )
31c37
<             breadth_first_visit(share->g, *orig, Q,
---
>             breadth_first_visit(share->g, *dest, Q,


The first #if 0'd section is a bunch of methods:

oqgraph::insert_edge()
oqgraph::delete_edge()
oqgraph::delete_all()
oqgraph::modify_edge()

Some of these track to other wrappers in graphcore.h, but ultimately, none are
used anywhere

So possibly, there is nothing missing?

--Andrew




On 20/05/13 06:46, Arjen Lentz wrote:
> Thanks Andrew
> I'll try and check it out today.
> 
> Could you indulge and see if you can add a breadth-first function?
> 
> Also wasn't there another function that was part commented out between oqgraph v2 to v3... getting that back to work is important as people might be using it.
> 
<snipped>


Follow ups

References