Boost C++ Libraries: Ticket #6780: [BGL] add Maximum Adjacency Search https://svn.boost.org/trac10/ticket/6780 <p> Currently, the maximum adjacency search (MAS) algorithm is embedded as a phase of the Stoer-Wagner min-cut algorithm. This patch promotes it to be a public search algorithm with a visitor concept similar to BFS or DFS. The existing Stoer-Wagner implementation is modified to use the MAS. The patch also includes HTML documentation of MAS. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6780 Trac 1.4.3 fvilas@… Wed, 11 Apr 2012 02:14:53 GMT attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">max_adj_search_v3.patch.gz</span> </li> </ul> Ticket viboes Mon, 28 May 2012 17:19:42 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6780#comment:1 https://svn.boost.org/trac10/ticket/6780#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Jeremiah Willcock</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">graph</span> </li> </ul> Ticket fvilas@… Mon, 28 May 2012 18:42:38 GMT <link>https://svn.boost.org/trac10/ticket/6780#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:2</guid> <description> <p> It would be nice to target 1.51, but if it has to slip, that is fine too. Let me know what changes I should make to get it accepted. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Mon, 28 May 2012 18:54:51 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6780#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:3</guid> <description> <p> Do you think it's worthwhile to change Stoer-Wagner to use your new code? I didn't see that in your patch. Also, do you have documentation for the new code? </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Mon, 28 May 2012 19:45:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6780#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:4</guid> <description> <p> I thought I covered both of those. </p> <p> $ zcat max_adj_search_v3.patch.gz | grep +++ </p> <p> +++ boost/graph/stoer_wagner_min_cut.hpp (working copy) </p> <p> +++ boost/graph/maximum_adjacency_search.hpp (working copy) </p> <p> +++ libs/graph/doc/maximum_adjacency_search.html (working copy) </p> <p> Did I miss something? </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Tue, 21 Aug 2012 03:09:26 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">max_adj_search_v4.patch.gz</span> </li> </ul> <p> Updated against 1.51.0 </p> Ticket fvilas@… Tue, 21 Aug 2012 03:13:04 GMT <link>https://svn.boost.org/trac10/ticket/6780#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:5</guid> <description> <p> Updated patch to new release. Patch includes new algorithm as boost/graph/maximum_adjacency_search.hpp, changes to boost/graph/stoer_wagner_min_cut.hpp to use the new algorithm, and documentation of the algorithm as libs/graph/doc/maximum_adjacency_search.html </p> <p> Since this is the same day as the release announcement for 1.51.0, what else is needed for the merge window for 1.52.0? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Tue, 21 Aug 2012 17:45:11 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6780#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:6</guid> <description> <p> Here are my comments: </p> <ul><li>What is the reason for having <code>mas_visitor_event_not_overridden</code> rather than just using <code>void</code> for the default return value? </li></ul><ul><li>Where does <code>unsigned long</code> come from in the return type of <code>maximum_adjacency_search</code>? Should there be some type obtained from a traits class used there instead? </li></ul><ul><li>Please have a version of any named-parameter function in the namespace <code>boost::graph</code> that uses Boost.Parameter, then have the old-style named parameter version just forward to it (look at <code>&lt;boost/graph/isomorphism.hpp&gt;</code> for a simple example). </li></ul><ul><li>Please try to avoid using Boost.Typeof (including the <code>BOOST_AUTO</code> macro) since some compilers that can otherwise compile Boost.Graph have trouble with it. </li></ul><ul><li>What is the reason for copying the priority queue on entry to <code>stoer_wagner_min_cut</code> rather than passing in a reference like before? </li></ul><p> Other than these issues, I think it's basically ready to put in, and it should make it into 1.52. Thank you for your contribution, and sorry for the delayed responses. </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Sat, 25 Aug 2012 12:32:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6780#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:7</guid> <description> <p> Thanks for the help. I will work on addressing these. </p> <p> The mas_visitor_event_not_overridden was a copy/paste from breadth_first_search.hpp. I can change the values to void, but I thought there was a reason for it in the BFS code, so I used that example. </p> <p> The unsigned long will be converted to the key_type of the priority queue. </p> <p> isomorphism.hpp has a few new named parameter macros that I was unfamiliar with, but it should clean up the code, so I will try that. </p> <p> It looks like the BOOST_AUTO macro is only used in the examine_edge() routine in the Stoer-Wagner visitor to get the weight map type. I was unaware that the macro caused some issues, so I will get that fixed. </p> <p> The conversion to pass-by-value happened when chasing down some "reference of reference" bugs. I forgot to put it back. I just fixed that and the code seems to compile and run fine. </p> <p> It may take me a bit to get this list implemented, especially getting more familiar with the named parameters macros. I will put up a v5 of the patch as soon as I have something, so we can keep things moving. Thanks again for the feedback. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>fvilas</dc:creator> <pubDate>Tue, 02 Oct 2012 02:27:45 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">max_adj_search_v5.patch.gz</span> </li> </ul> Ticket fvilas@… Tue, 02 Oct 2012 02:29:30 GMT <link>https://svn.boost.org/trac10/ticket/6780#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:8</guid> <description> <p> I finally managed to get through the distractions of the day job and school to update this. It looks like I missed the new features window for 1.52.0, but if it is ready, we can target 1.53.0. Thoughts? </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Tue, 27 Nov 2012 03:04:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6780#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:9</guid> <description> <p> Is this patch in good shape for the merge window? What else do I need to tackle? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Mon, 03 Dec 2012 15:20:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6780#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:10</guid> <description> <p> Here's my updated version of the patch (most stylistic things). It does not pass the Stoer-Wagner tests in the Boost trunk, however. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Mon, 03 Dec 2012 15:20:39 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">max_adj_search_v6.patch</span> </li> </ul> Ticket fvilas@… Fri, 07 Dec 2012 22:38:21 GMT <link>https://svn.boost.org/trac10/ticket/6780#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:11</guid> <description> <p> I incorporated your changes and added the include for one_bit_color_map.hpp. Then I made this patch, got a clean copy of the code from SVN and applied the patch to the new code. The normal "boostrap.sh ; b2 ; cd libs/graph/example ; ../../../b2" seemed to work. I ran the resulting code for Stoer-Wagner and it worked. This was using GCC 4.7.1 with the default settings from bjam. </p> <p> I have thought about changing the graph used in the test case to match the picture in the documentation, but the result should still be correct for the graph tested. </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Fri, 07 Dec 2012 22:38:45 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">max_adj_search_v7.patch</span> </li> </ul> Ticket Jeremiah Willcock Sat, 08 Dec 2012 02:25:06 GMT attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">mas_test_errors.txt</span> </li> </ul> <p> Errors from testing with patch applied </p> Ticket Jeremiah Willcock Sat, 08 Dec 2012 02:25:40 GMT <link>https://svn.boost.org/trac10/ticket/6780#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:12</guid> <description> <p> I have attached the errors that I get from testing the latest version of the patch. </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Sat, 08 Dec 2012 04:30:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6780#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:13</guid> <description> <p> I missed the test directory instead of the example directory. Now that I am able to duplicate the error, it looks like I have a task for the weekend... I will upload the fix as soon as I have it. Thanks for your help. </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Sun, 06 Jan 2013 01:12:51 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">max_adj_search_v8.patch</span> </li> </ul> <p> Updated patch </p> Ticket fvilas@… Sun, 06 Jan 2013 01:13:42 GMT <link>https://svn.boost.org/trac10/ticket/6780#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6780#comment:14</guid> <description> <p> New patch... Added mas_test.cpp test harness. Added dispatch based on weight_map, if not provided, then edge_weight is required. Return value changed to void, and the tuple previously returned can be retrieved through a visitor, shown in the test harness. Docs updated to reflect the return value change. More fixes in general, all around. This took a few weekends, as opposed to the one I expected. </p> <p> Let me know if there is anything else needed. </p> </description> <category>Ticket</category> </item> <item> <author>fvilas@…</author> <pubDate>Sun, 24 Feb 2013 03:12:38 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/6780 https://svn.boost.org/trac10/ticket/6780 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">max_adj_search_v9.patch</span> </li> </ul> <p> Updated documentation </p> Ticket Jeremiah Willcock Tue, 12 Mar 2013 00:35:52 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6780#comment:15 https://svn.boost.org/trac10/ticket/6780#comment:15 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83410" title="Added maximum adjacency search from Fernando Vilas; fixes #6780">[83410]</a>) Added maximum adjacency search from Fernando Vilas; fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6780" title="#6780: Patches: [BGL] add Maximum Adjacency Search (closed: fixed)">#6780</a> </p> Ticket