Skip to content

Commit

Permalink
Merge pull request #106 from stdgraph/info_structs
Browse files Browse the repository at this point in the history
Rename "descriptor" structs to "info" structs
  • Loading branch information
pratzl authored Nov 16, 2024
2 parents 448284e + 00c70d2 commit c07849d
Show file tree
Hide file tree
Showing 16 changed files with 163 additions and 148 deletions.
2 changes: 1 addition & 1 deletion D3126_Overview/tex/overview.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ \section{Goals and Priorities}
\item A Graph Container Interface, used by Views and Algorithms, that provides a consistent interface for different graph data structures. The interface
includes concepts, types, traits and functions and provides a similar role to the Ranges library for standard containers.
\begin{itemize}
\item Descriptors for a consistent data model for vertex, edge and neighbor by views and edge lists.
\item Info structs for a consistent data model for vertex, edge and neighbor by views and edge lists.

\item Adjacency list, an outer range of vertices with an inner range of outgoing edges on each vertex.
\begin{itemize}
Expand Down
1 change: 1 addition & 0 deletions D3126_Overview/tex/revision.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ \subsection*{\paperno r3}
\item Add a note that we will be unable to support a freestanding graph library in this proposal because
of the need for \tcode{stack}, \tcode{queue} and potential \tcode{bad_alloc} exception in many of
the algorithms.
\item Rename \tcode{descriptor} structs to \tcode{info} structs in preparation for new BGL-like descriptors.
\end{itemize}
10 changes: 5 additions & 5 deletions D3128_Algorithms/src/visitor_edge.hpp
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
template <class G, class Visitor>
concept has_on_examine_edge = // For exposition only
requires(Visitor& v, edge_descriptor<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
requires(Visitor& v, edge_info<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
{ v.on_examine_edge(edesc) };
};
template <class G, class Visitor>
concept has_on_edge_relaxed = // For exposition only
requires(Visitor& v, edge_descriptor<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
requires(Visitor& v, edge_info<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
{ v.on_edge_relaxed(edesc) };
};
template <class G, class Visitor>
concept has_on_edge_not_relaxed = // For exposition only
requires(Visitor& v, edge_descriptor<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
requires(Visitor& v, edge_info<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
{ v.on_edge_not_relaxed(edesc) };
};
template <class G, class Visitor>
concept has_on_edge_minimized = // For exposition only
requires(Visitor& v, edge_descriptor<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
requires(Visitor& v, edge_info<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
{ v.on_edge_minimized(edesc) };
};
template <class G, class Visitor>
concept has_on_edge_not_minimized = // For exposition only
requires(Visitor& v, edge_descriptor<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
requires(Visitor& v, edge_info<vertex_id_t<G>, true, edge_reference_t<G>, void> edesc) {
{ v.on_edge_not_minimized(edesc) };
};
8 changes: 4 additions & 4 deletions D3128_Algorithms/src/visitor_vertex.hpp
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
template <class G, class Visitor>
concept has_on_initialize_vertex = // For exposition only
requires(Visitor& v, vertex_descriptor<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
requires(Visitor& v, vertex_info<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
{ v.on_initialize_vertex(vdesc) };
};
template <class G, class Visitor>
concept has_on_discover_vertex = // For exposition only
requires(Visitor& v, vertex_descriptor<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
requires(Visitor& v, vertex_info<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
{ v.on_discover_vertex(vdesc) };
};
template <class G, class Visitor>
concept has_on_examine_vertex = // For exposition only
requires(Visitor& v, vertex_descriptor<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
requires(Visitor& v, vertex_info<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
{ v.on_examine_vertex(vdesc) };
};
template <class G, class Visitor>
concept has_on_finish_vertex = // For exposition only
requires(Visitor& v, vertex_descriptor<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
requires(Visitor& v, vertex_info<vertex_id_t<G>, vertex_reference_t<G>, void> vdesc) {
{ v.on_finish_vertex(vdesc) };
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
template <class VId, bool Sourced, class E, class EV>
struct edge_descriptor {
struct edge_info {
using source_id_type = VId; // e.g. vertex\_id\_t<G> when SourceId==true, or void
using target_id_type = VId; // e.g. vertex\_id\_t<G>
using edge_type = E; // e.g. edge\_reference\_t<G> or void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
template <class VId, bool Sourced, class V, class VV>
struct neighbor_descriptor {
struct neighbor_info {
using source_id_type = VId; // e.g. vertex\_id\_t<G> when Sourced==true, or void
using target_id_type = VId; // e.g. vertex\_id\_t<G>
using vertex_type = V; // e.g. vertex\_reference\_t<G> or void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
template <class VId, class V, class VV>
struct vertex_descriptor {
struct vertex_info {
using id_type = VId; // e.g. vertex\_id\_t<G>
using vertex_type = V; // e.g. vertex\_reference\_t<G> or void
using value_type = VV; // e.g. vertex\_value\_t<G> or void
Expand Down
1 change: 1 addition & 0 deletions D3129_Views/tex/revision.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ \subsection*{\paperno r1}
\item Add a note that we will be unable to support a freestanding graph library in this proposal because
of the need for \tcode{stack}, \tcode{queue} and potential \tcode{bad_alloc} exception in many of
the views.
\item Rename \tcode{descriptor} structs to \tcode{info} structs in preparation for new BGL-like descriptors.
\end{itemize}
Loading

0 comments on commit c07849d

Please # to comment.