← Back to team overview

oqgraph-dev team mailing list archive

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

 

Hi,

It is possible that I wrote the necessary code for the feature and never enabled it.
I cannot remember at this time.


Antony T Curtis
atcurtis@xxxxxxxxx



On May 28, 2013, at 3:47 PM, Arjen Lentz <arjen@xxxxxxxxxxxxx> wrote:

> Hi Andrew
> 
>> 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?
> 
> I've seen that code too. It was there when Antony showed me the v3 code.
> Antony?
> 
> The key is of course that all tests should pass correctly, and we need to test for all permutations of latch/origid/destid.
> 
> 
>> < 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>
> 
> 
> 
> -- 
> Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
> Australian peace of mind for your MySQL/MariaDB infrastructure.
> 
> Follow us at http://openquery.com/blog/ & http://twitter.com/openquery
> 



References