Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,11 @@ bool b = ref( const Graph& g,
| `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`.
|===

Before invocation, new_cont is initialized as a copy of old_cont. The function should mutate new_cont to reflect the resources consumed along the edge.

Return true if the extension is feasible, or false to discard the label (e.g. when a resource limit would be exceeded). The old_cont parameter is provided for reference, in case the update is more naturally expressed relative to the prior state.

Comment on lines +596 to +599

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some backticks got lost, "the function" is a bit vague compared to ref (it's already named), and some ideas are spread across the two paragraphs. Maybe something closer to:

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.

If `ref` returns `false`, the new label is discarded and the search does not extend along `ed` from that label.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I notice it looked not as I expected. I will check it out


Moreover, a reference to a type modelling the ResourceExtensionFunction concept can be passed as a parameter to `r_c_shortest_paths`, see above.

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].
Expand Down
Loading