Skip to content

Commit 8265a10

Browse files
authored
Merge pull request #668 from andreacassioli/improve-docs-for-ResourceExtensionFunction-in-r_c_shortest_paths
Refine docs for RCSP
2 parents d755cdf + 50614cc commit 8265a10

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎doc/modules/ROOT/pages/algorithms/shortest_paths/r_c_shortest_paths.adoc‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,10 @@ bool b = ref( const Graph& g,
593593
| `ref` must return `true` if and only if the extension is feasible, i.e., if `new_cont` fulfills all resource constraints at the target vertex of `ed`.
594594
|===
595595

596+
Before `ref` is invoked, `new_cont` is initialized as a copy of `old_cont`. `ref` should update `new_cont` to reflect the resources consumed along `ed`. `old_cont` is passed for reference, in case the update is more naturally expressed relative to the prior state.
597+
598+
If `ref` returns `false`, the new label is discarded and the search does not extend along `ed` from that label.
599+
596600
Moreover, a reference to a type modelling the ResourceExtensionFunction concept can be passed as a parameter to `r_c_shortest_paths`, see above.
597601

598602
Hence, a type modelling the ResourceExtensionFunction concept is likely to be a function or a http://www.boost.org/sgi/stl/functors.html[function object].

0 commit comments

Comments
 (0)