Skip to content

Commit

Permalink
Minor cosmetic changes
Browse files Browse the repository at this point in the history
Fix comment indentation
Replace "tag_invoke properties" with "CPO properties" in comments
Update ToDo.md
  • Loading branch information
pratzl committed Feb 8, 2024
1 parent eaf3e60 commit 3d058e7
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 128 deletions.
82 changes: 49 additions & 33 deletions ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
## Open

### ToDo
- Graph API
- Graph Container Interface (GCI)
- [ ] Common
- [ ] Apply tag_invoke design in P2300 [wait to see if we want to use tag_invoke]
- [ ] Use Neibloid style for all CPOs
- [x] Ranges
- [ ] Concepts and type_traits
- [x] graph: adjacency_list, sourced_adjacency_list, adjacency_matrix, undirected_incidence_graph
- [x] graph: adjacency_list, sourced_adjacency_list, adjacency_matrix
- [ ] **view concepts: vertex_view, edge_view, neighbor_view returned from graph views**
- [ ] **function concepts: VVF, EVF**
- [ ] Edgelist concept(s)
- [ ] Graph API
- [ ] depth() CPO? bfs, dfs. size() is different; depth for BFS takes extra work and is diff concept.
- [x] cancel() CPO? bfs, dfs: no, member only
Expand All @@ -37,24 +38,29 @@
- [x] view functions should be in std::graph::view
- [ ] add range overloads to appropriate views (DFS, BFS, topo_sort, etc.)
- [ ] vertexlist
- [ ] Copy VVF to iterator (not reference)
- [ ] Accept VVF(g,u) & allow vertex_value?
- [ ] Use VVF&& instead of const VVF&
- [x] verify it is a std\::ranges\::view<>
- [x] Implement vertexlist(g,vr)
- [x] Implement vertexlist(g,vr,vvf)
- [ ] Implement basic_vertexlist(g,vr)
- [ ] Implement basic_vertexlist(g,vr,vvf)
- [ ] Extend support for vvf(uid), in addition to vvf(u)
- [ ] incidence
- [ ] Copy EVF to iterator (not reference)
- [ ] Use EVF&& instead of const EVF&
- [ ] unit tests for undirected_graph\<G\>
- [x] verify it is a std\::ranges\::view<>
- [ ] neighbors
- [ ] Copy VVF to iterator (not reference)
- [ ] Use VVF&& instead of const VVF&
- [ ] Extend support for vvf(uid), in addition to vvf(u)
- [ ] unit tests for undirected_graph\<G\>
- [x] verify it is a std\::ranges\::view<>
- [ ] Implement basic_neighbors(g,vr)
- [ ] Implement basic_neighbors(g,vr,vvf)
- [ ] edgelist
- [ ] Copy EVF to iterator (not reference)
- [ ] Use EVF&& instead of const EVF&
- [ ] unit tests for undirected_graph\<G\>
- [x] verify it is a std\::ranges\::view<>
- [x] vertices_depth_first_search_view
- [x] vertices_dfs_view
- [x] validate results & add unit tests
- [x] support Cancelable
- [x] support VVF
Expand All @@ -63,8 +69,8 @@
- [x] verify it is a std::ranges::view<>
- [x] create CPOs
- [x] Use real_target_id(g,uv,src) for both directed_incidence_graph & undirected_incidence_graph to consolidate code
- [x] Add allocator parameter & use with _colors
- [x] edges_depth_first_search_view
- [ ] basic_vertices_dfs_view
- [x] edges_dfs_view
- [x] validate results & add unit tests
- [x] support Cancelable
- [x] support EVF
Expand All @@ -73,32 +79,43 @@
- [x] support begin, end, depth/size, empty, swap free functions
- [x] verify it is a std::ranges::view<>
- [x] create CPOs: edges, sourced_edges
- [x] Use real_target_id(g,uv,src) for both directed_incidence_graph & undirected_incidence_graph to consolidate code
- [x] Add allocator parameter & use with _colors
- [ ] **bfs_vertex_range**
- [ ] **bfs_edge_range**
- [ ] topological_sort_vertex_range
- [ ] topological_sort_edge_range
- [ ] basic__edges_dfs_view
- [ ] vertices_bfs_view
- [ ] edges_bfs_view
- [ ] topological_sort_vertices_view
- [ ] topological_sort_edges_view
- [ ] allow options to exclude vertex/edge reference on results (Andrew)
- [ ] Common
- [ ] Add depth(search) CPO for dfs, bfs, topo_sort
- [ ] Add size(search) CPO for dfs, bfs, topo_sort
- Algorithms
- [ ] Common
- [ ] Add depth(search) CPO for dfs, bfs, topo_sort
- [ ] Add size(search) CPO for dfs, bfs, topo_sort
- [ ] Algorithms (full & simplified/book)
- [ ] Shortest Paths
- [x] Dijkstra book (impl from AndrewL)
- [ ] **dijkstra_shortest_path**
- [ ] **bellman_ford_shortest_path**
- [x] Shortest Paths
- [x] Dijkstra_clrs (book impl from AndrewL)
- [x] dijkstra_shortest_path
- [x] bellman_ford_shortest_path
- [ ] Clustering
- [ ] Triangle counting
- [ ] Communities
- [ ] Label propagation
- [ ] Components
- [ ] connected_components
- [ ] strongly_connected_components
- [ ] strongly_connected_components (Kosaraju & Tarjan)
- [ ] biconnected_components
- [ ] articulation_points
- [ ] Directed Acyclic Graphs
- [ ] Topological Sort, Single Source
- [ ] Maximal Independent Set
- [ ] Maximal Independent Set
- [ ] Link Analysis
- [ ] Jaccard Coefficient
- [ ] Minimal Spanning Tree
- [ ] Kruskal Minimum Spanning Tree
- [ ] Prim Minimal Spanning Tree
- [ ] Others to consider
- [ ] page_rank; not a good candidate for the standard because there are too many options; better as an example
- [ ] Edgelist algorithms (prove design; not for P1709)
- [ ] Maximal Independent Set (edgelist)
- [ ] Union Find (edgelist)
- [ ] page_rank
- [ ] betweenness_centrality
- [ ] triangle_count
- [ ] Minimum spanning tree
Expand All @@ -118,16 +135,13 @@
- [ ] validate & add unit tests
- Graph Containers (data structures)
- [x] compressed_graph (for P1709)
- [ ] **Use concepts for load, load_edges, load_vertices, ctors**
- [x] Support VV=void
- [x] Support EV=void
- [x] Use copyable_vertex & copyable_edge concepts in graph ctors, load functions
- [x] Add ctor with initializer_list for simple demo
- [ ] Implement load_graph(), load_vertices(), load_edges() CPOs (define concepts)
- [ ] dynamic_graph
- [ ] **Use concepts for load, load_edges, load_vertices, ctors**
- [ ] Implement load_graph(), load_vertices(), load_edges() CPOs (define concepts)
- [ ] test push_or_insert() to assure it does the right thing for const, value, &, &&, ...
- [ ] graph with map-based vertices (requires different algorithm impl)
- [x] Use copyable_vertex & copyable_edge concepts in graph ctors, load functions
- [ ] Support non-integral vertex_ids
- [ ] constexpr graph based on std::array
- [ ] undirected_adjacency_list<EV,VV,GV,VId,Alloc>
- [x] directed_adjacency_vector (retired)
Expand Down Expand Up @@ -168,6 +182,8 @@
- C\+\+20 and C\+\+23
- [ ] modules
- [ ] coroutines (simplify DFS, BFS & TopoSort?)
- [ ] Examples
- [ ] ABC
- Documentation
- [x] Decprecate original "graph" repository
- [ ] README.md
Expand Down
7 changes: 2 additions & 5 deletions include/graph/container/compressed_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ class compressed_graph_base
//v_vector_type v_; // v_[n] holds the edge value for col_index_[n]
//row_values_type row_value_; // row_value_[r] holds the value for row_index_[r], for VV!=void

private: // tag_invoke properties
private: // CPO properties
friend constexpr vertices_type vertices(compressed_graph_base& g) {
if (g.row_index_.empty())
return vertices_type(g.row_index_); // really empty
Expand Down Expand Up @@ -908,7 +908,7 @@ class compressed_graph : public compressed_graph_base<EV, VV, GV, VId, EIndex, A
constexpr compressed_graph(const initializer_list<copyable_edge_t<VId, EV>>& ilist, const Alloc& alloc = Alloc())
: base_type(ilist, alloc) {}

private: // tag_invoke properties
private: // CPO properties
friend constexpr value_type& graph_value(graph_type& g) { return g.value_; }
friend constexpr const value_type& graph_value(const graph_type& g) { return g.value_; }

Expand Down Expand Up @@ -969,9 +969,6 @@ class compressed_graph<EV, VV, void, VId, EIndex, Alloc>
constexpr compressed_graph(const initializer_list<copyable_edge_t<VId, EV>>& ilist, const Alloc& alloc = Alloc())
: base_type(ilist, alloc) {}


public: // Operations
private: // tag_invoke properties
};

} // namespace std::graph::container
10 changes: 5 additions & 5 deletions include/graph/container/dynamic_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class dynamic_edge_value {
private:
value_type value_ = value_type();

private: // tag_invoke properties
private: // CPO properties
friend constexpr value_type& edge_value(graph_type& g, edge_type& uv) noexcept { return uv.value_; }
friend constexpr const value_type& edge_value(const graph_type& g, const edge_type& uv) noexcept { return uv.value_; }
};
Expand Down Expand Up @@ -678,7 +678,7 @@ class dynamic_vertex_base {
private:
edges_type edges_;

private: // tag_invoke properties
private: // CPO properties
friend constexpr edges_type& edges(graph_type& g, vertex_type& u) { return u.edges_; }
friend constexpr const edges_type& edges(const graph_type& g, const vertex_type& u) { return u.edges_; }

Expand Down Expand Up @@ -748,7 +748,7 @@ class dynamic_vertex : public dynamic_vertex_base<EV, VV, GV, VId, Sourced, Trai
private:
value_type value_ = value_type();

private: // tag_invoke properties
private: // CPO properties
friend constexpr value_type& vertex_value(graph_type& g, vertex_type& u) { return u.value_; }
friend constexpr const value_type& vertex_value(const graph_type& g, const vertex_type& u) { return u.value_; }
};
Expand Down Expand Up @@ -1227,7 +1227,7 @@ class dynamic_graph_base {
private: // Member Variables
vertices_type vertices_;

private: // tag_invoke properties
private: // CPO properties
friend constexpr vertices_type& vertices(dynamic_graph_base& g) { return g.vertices_; }
friend constexpr const vertices_type& vertices(const dynamic_graph_base& g) { return g.vertices_; }

Expand Down Expand Up @@ -1600,7 +1600,7 @@ class dynamic_graph : public dynamic_graph_base<EV, VV, GV, VId, Sourced, Traits
private:
value_type value_; ///< Graph value

private: // tag_invoke properties
private: // CPO properties
friend constexpr value_type& graph_value(graph_type& g) { return g.value_; }
friend constexpr const value_type& graph_value(const graph_type& g) { return g.value_; }
};
Expand Down
Loading

0 comments on commit 3d058e7

Please sign in to comment.