Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66099 - in trunk: boost/graph libs/graph/doc
From: jewillco_at_[hidden]
Date: 2010-10-19 12:00:18


Author: jewillco
Date: 2010-10-19 12:00:15 EDT (Tue, 19 Oct 2010)
New Revision: 66099
URL: http://svn.boost.org/trac/boost/changeset/66099

Log:
Merged patch from #4631 and made appropriate doc changes; fixes #4631
Text files modified:
   trunk/boost/graph/r_c_shortest_paths.hpp | 12 ++++++++----
   trunk/libs/graph/doc/r_c_shortest_paths.html | 4 ++--
   2 files changed, 10 insertions(+), 6 deletions(-)

Modified: trunk/boost/graph/r_c_shortest_paths.hpp
==============================================================================
--- trunk/boost/graph/r_c_shortest_paths.hpp (original)
+++ trunk/boost/graph/r_c_shortest_paths.hpp 2010-10-19 12:00:15 EDT (Tue, 19 Oct 2010)
@@ -559,8 +559,10 @@
                                dominance,
                                la,
                                vis );
- pareto_optimal_solution = pareto_optimal_solutions[0];
- pareto_optimal_resource_container = pareto_optimal_resource_containers[0];
+ if (!pareto_optimal_solutions.empty()) {
+ pareto_optimal_solution = pareto_optimal_solutions[0];
+ pareto_optimal_resource_container = pareto_optimal_resource_containers[0];
+ }
 }
 
 // third overload:
@@ -644,8 +646,10 @@
                                dominance,
                                default_r_c_shortest_paths_allocator(),
                                default_r_c_shortest_paths_visitor() );
- pareto_optimal_solution = pareto_optimal_solutions[0];
- pareto_optimal_resource_container = pareto_optimal_resource_containers[0];
+ if (!pareto_optimal_solutions.empty()) {
+ pareto_optimal_solution = pareto_optimal_solutions[0];
+ pareto_optimal_resource_container = pareto_optimal_resource_containers[0];
+ }
 }
 // r_c_shortest_paths
 

Modified: trunk/libs/graph/doc/r_c_shortest_paths.html
==============================================================================
--- trunk/libs/graph/doc/r_c_shortest_paths.html (original)
+++ trunk/libs/graph/doc/r_c_shortest_paths.html 2010-10-19 12:00:15 EDT (Tue, 19 Oct 2010)
@@ -446,11 +446,11 @@
 OUT: <tt>std::vector&lt;typename graph_traits&lt;Graph&gt;::edge_descriptor&gt;&amp;
 pareto_optimal_solution</tt>
 <blockquote>
-A container for storing the first Pareto-optimal (undominated) solution (<i>s</i>-<i>t</i>-path) in the overloads where only one Pareto-optimal solution is returned. The path is returned as a sequence of edge descriptors in reverse order (from <tt>t</tt> to <tt>s</tt>).
+A container for storing the first Pareto-optimal (undominated) solution (<i>s</i>-<i>t</i>-path) in the overloads where only one Pareto-optimal solution is returned. The path is returned as a sequence of edge descriptors in reverse order (from <tt>t</tt> to <tt>s</tt>). This argument is not modified if there are no solutions.
 </blockquote>
 OUT: <tt>Resource_Container&amp; pareto_optimal_resource_container</tt>
 <blockquote>
-A <tt>Resource_Container</tt> object for storing the Pareto-optimal resource container corresponding to the first Pareto-optimal path in the overloads where only one Pareto-optimal solution is returned.
+A <tt>Resource_Container</tt> object for storing the Pareto-optimal resource container corresponding to the first Pareto-optimal path in the overloads where only one Pareto-optimal solution is returned. This argument is not modified if there are no solutions.
 </blockquote>
 IN: <tt>const Resource_Container&amp; rc</tt>
 <blockquote>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk