-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from stdgraph/idx_adj_list
Idx adj list
- Loading branch information
Showing
9 changed files
with
280 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Ranges concepts and types don't include the ranges:: namespace prefix for brevity | ||
// and clarity of purpose | ||
|
||
template <adjacency_list G, | ||
random_access_range Distance, | ||
random_access_range Predecessor | ||
class WF = function<range_value_t<Distance>(edge_reference_t<G>)>> | ||
requires random_access_range<vertex_range_t<G>> && | ||
integral<vertex_id_t<G>> && | ||
is_arithmetic_v<range_value_t<Distance>> && | ||
convertible_to<vertex_id_t<G>, range_value_t<Predecessor>> && | ||
edge_weight_function<G, WF> | ||
void dijkstra_shortest_paths( | ||
const G& g, | ||
vertex_id_t<G> source, | ||
Distance& distances, | ||
Predecessor& predecessors, | ||
WF&& w = [](edge_reference_t<G> uv) { return range_value_t<Distance>(1); }); | ||
|
||
template <adjacency_list G, | ||
random_access_range Distance, | ||
random_access_range Predecessor, | ||
class Compare, | ||
class Combine, | ||
class WF = function<range_value_t<Distance>(edge_reference_t<G>)>> | ||
requires random_access_range<vertex_range_t<G>> && | ||
integral<vertex_id_t<G>> && | ||
is_arithmetic_v<range_value_t<Distance>> && | ||
convertible_to<vertex_id_t<G>, range_value_t<Predecessor>> && | ||
edge_weight_function<G, WF> && | ||
strict_weak_order<Compare, range_value_t<Distance>, range_value_t<Distance> && | ||
assignable_from <range_reference_t<Distance>, | ||
invoke_result_t <Combine, invoke_result_t<WF, edge_t<G>>, | ||
void dijkstra_shortest_paths( | ||
const G& g, | ||
vertex_id_t<G> source, | ||
Distance& distances, | ||
Predecessor& predecessors, | ||
WF&& w, | ||
Compare&& comp, | ||
Combine&& comb); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.