You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: D3126_Overview/tex/overview.tex
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,8 @@ \section{Overview}
35
35
\section{Goals and Priorities}
36
36
37
37
The main goal of this library is to provide a self-consistent and systematic library of software components for
38
-
graph computations, based on well-defined graph representations. it includes generic
39
-
algorithms, named requirements, views, and utilities.
40
-
views.
38
+
graph computations, based on well-defined graph representations. It includes generic
39
+
algorithms, named requirements, views, and utilities.
41
40
%
42
41
It is informed by the authors' past experience with the Boost Graph Library (BGL), the NWGraph library, the C++
43
42
GraphBLAS, and the library proposed in P1709. The proposed library seeks to leverage the existing Standard
@@ -168,7 +167,7 @@ \section{What this proposal is \textbf{not}}
168
167
\section{Impact on the Standard}
169
168
This proposal is a pure \textbf{library} extension.
170
169
171
-
\section{Interaction wtih Other Papers}
170
+
\section{Interaction with Other Papers}
172
171
The entirety of our proposal for graph algorithms and data structures comprises multiple companion papers: D3127 (Terminology), D3128 (Algorithms), D3129 (Views), D3130 (Container Interface), D3131 (Containers), D9903 (Operators), and D9907 (Adaptors).
173
172
Other than these papers, there are no interactions with other proposals to the standard.
174
173
@@ -190,7 +189,7 @@ \section{Prior Art}
190
189
\textbf{boost::graph} has been an important C++ graph implementation since 2001. It was developed with the goal of providing
191
190
a modern (at the time) generic library that addressed all the needs of a graph library user. It is still a viable library used today, attesting to the value it brings.
192
191
193
-
However, boost::graph was written using C++98 in an ``expert-friendly'' style, adding many abstractions and using sophisticated tempate metaprogramming, making it difficult to use by a casual developer. Particular pain-points described in ad-hoc discussions with users include: property maps, parameter-passing, visitors.
192
+
However, boost::graph was written using C++98 in an ``expert-friendly'' style, adding many abstractions and using sophisticated template metaprogramming, making it difficult to use by a casual developer. Particular pain-points described in ad-hoc discussions with users include: property maps, parameter-passing, visitors.
194
193
195
194
\medskip
196
195
@@ -199,7 +198,7 @@ \section{Prior Art}
199
198
that was more accessible to the average developer. % with the latest algorithms.
200
199
201
200
While NWGraph made important strides to introduce the idea of an adjacency list as a range-of-ranges and implemented many important algorithms,
202
-
there are some areas it didn't address that come a practical use in the field. For instance, it didn't have a well-defined API for graph
201
+
there are some areas it didn't address that are of practical use in the field. For instance, it didn't have a well-defined API for graph
203
202
data structures that could be applied to existing graphs, and there wasn't a uniform approach to properties.
204
203
205
204
This proposal takes the best of NWGraph, with previous work done for P1709 to define a Graph Container Interface, to provide a library that
@@ -271,7 +270,7 @@ \section{Namespaces}
271
270
\item[]\tcode{std::ranges/graph}, \tcode{std::ranges::graph::views} and \tcode{std::ranges::graph::edgelist}
272
271
\end{itemize}
273
272
The advantage of these two options are that there would be no requirement to use the ranges:: prefix for things
274
-
in the std::ranges namespace, a common occurance.
273
+
in the std::ranges namespace, a common occurrence.
275
274
276
275
\section{Notes and Considerations}
277
276
There are some interesting observations that can be made about graphs and how they compare and contrast to the
@@ -298,7 +297,7 @@ \section{Notes and Considerations}
298
297
\end{itemize}
299
298
300
299
The addition of concepts to the standard library is a serious consideration because, once added, they cannot
301
-
be removed. We believe that adjacency lists as a range-of-ranges merits the addition new concepts but we recognize that it
300
+
be removed. We believe that adjacency lists as a range-of-ranges merits the addition of new concepts but we recognize that it
302
301
may be a controversial decision. Toward that end, we will continue to include them to help clarify the examples given
303
302
and are assumed to be "For exposition only" as suggested implementation until a clear decision to include them, or not,
Copy file name to clipboardExpand all lines: D3127_Terminology/tex/terminology_0.tex
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ \subsection{Graph Representation: Enumerating the Vertices}
85
85
We summarize some remaining terminology about vertices and edges.
86
86
\begin{itemize}
87
87
\item
88
-
An edge $e_k$ may be \emph{directed}, denoted as the ordered pair $e_k=(v_i, v_j)$, or it may be
88
+
An edge $e_k$ may be \emph{directed}, denoted as the ordered pair $e_k=(v_i, v_j)$, or it may be
89
89
\emph{undirected}, denoted as the (unordered) set $e_k=\{v_i, v_j\}$. The edges
90
90
in $E$ are either all directed or all undirected,
91
91
corresponding respectively to a \emph{directed graph} or to an \emph{undirected} graph.
@@ -390,7 +390,7 @@ \section{Bipartite Graphs}
390
390
%
391
391
Thus, a graph, as we have defined it, cannot model the IMDB.
392
392
393
-
There is a small generalization we can make to the definition of graph that will result in a suitable abstraction for modeling the IMDB. In particular, we need one set of vertices corresponding to actors, another set of vertices corresponding to movies, and then a set of edges corresponding to the relationships between actors and movies. There are two kinds of relationships to consider actors in movies or movies starring actors. To be well-defined, the edge set may only contain one kind of relationship. To capture this kind of model, we define a \emph{structurally bipartite graph} $H = \{ U, V, E \}$, where vertex sets $U$ and $V$ are enumerated $U = \{ u_0, u_1, \ldots , u_{n0} \}$ and $V = \{ v_0, v_1, \ldots v_{n1}\}$,
393
+
There is a small generalization we can make to the definition of graph that will result in a suitable abstraction for modeling the IMDB. In particular, we need one set of vertices corresponding to actors, another set of vertices corresponding to movies, and then a set of edges corresponding to the relationships between actors and movies. There are two kinds of relationships to consider: actors in movies or movies starring actors. To be well-defined, the edge set may only contain one kind of relationship. To capture this kind of model, we define a \emph{structurally bipartite graph} $H = \{ U, V, E \}$, where vertex sets $U$ and $V$ are enumerated $U = \{ u_0, u_1, \ldots , u_{n0} \}$ and $V = \{ v_0, v_1, \ldots v_{n1}\}$,
394
394
and the edge set $E$ consists of pairs $(u_i, v_j)$ where $u_i$ is in $U$ and $v_j$ is in $V$.
395
395
396
396
The \emph{adjacency matrix representation of a structurally bipartite graph} is
@@ -404,7 +404,7 @@ \section{Bipartite Graphs}
404
404
\end{array}
405
405
\right.
406
406
\]
407
-
From this adjacency matrix representation we can readily construct coordinate and compressed sparse representations. The only structural difference between the representations of a structurally bipartite graph and that of a unipartite graph is that of vertex cardinality. That is, in a unipartite graph, edges map from $V$ to $V$, and hence the values in the left hand column and in the right hand column of a coordinate representation would be in the same range: $[0, |V|)$. However, for a structurally bipartite graph, this is no longer the case. Although the coordinate representation still consists of pairs of vertex indices, the range of values in the left hand column is $[0, |U|)$, while in the right hand column it is $[0, |V|)$. Similarly, the compressed representation will have $|U|$ entries, but the values stored in each entry may range from $[0, |V|)$. We note that these are constraints on values, not on structure.
407
+
From this adjacency matrix representation we can readily construct coordinate and compressed sparse representations. The only structural difference between the representations of a structurally bipartite graph and that of a unipartite graph is that of vertex cardinality. That is, in a unipartite graph, edges map from $V$ to $V$, and hence the values in the left hand column and in the right hand column of a coordinate representation would be in the same range: $[0, |V|)$. However, for a structurally bipartite graph, this is no longer the case. Although the coordinate representation still consists of pairs of vertex indices, the range of values in the left hand column is $[0, |U|)$, while in the right hand column it is $[0, |V|)$. Similarly, the compressed representation will have $|U|$ entries, but the values stored in each entry may range from $[0, |V|)$. We note that these are constraints on values, not on structure.
408
408
409
409
410
410
\begin{figure}[ht]
@@ -474,9 +474,9 @@ \section{Partitioned Graphs}
474
474
475
475
% These are definitely already covered in the examples above.
476
476
% \subsection{From Edge List to Adjacency List}
477
-
% \andrew{Scan edge list and insert edgest into adjacency list. Adjacency list must support insertion.}
477
+
% \andrew{Scan edge list and insert edges into adjacency list. Adjacency list must support insertion.}
478
478
% \subsection{Edge List and Adjacency List: Compressed Edge List}
479
-
% \andrew{Using a sort and group-by (or a sort, a run-length encoding, and a scan), we can compactify the edge-list reprentation and at the same time obtain an adjacency-list representation -- one that is memory and compute efficient. Best of both worlds. Has same basic structural principles as CSR / CSC matrices in linear algebra -- but much more general.}
479
+
% \andrew{Using a sort and group-by (or a sort, a run-length encoding, and a scan), we can compactify the edge-list representation and at the same time obtain an adjacency-list representation -- one that is memory and compute efficient. Best of both worlds. Has same basic structural principles as CSR / CSC matrices in linear algebra -- but much more general.}
480
480
481
481
\section{Regarding Algorithms}
482
482
@@ -599,7 +599,7 @@ \section{Graphs and Sparse Matrices}
599
599
A sparse matrix can be considered as a structurally bipartite graph representation. Suppose that we have a sparse matrix $A$ represented as $\{(i, j, a_{ij})\}$. We can create a structurally bipartite $J = \{U, V, E\}$ such that $(i,j)$ is in $E$ if and only if $\{(i, j, a_{ij})\}$ is in $A$. The coordinate and compressed representations for a sparse matrix are the same as for the graph (and, in fact, the terminology ``coordinate'' and ``compressed sparse'' originate in sparse numerical linear algebra). For a matrix, the sets $U$ and $V$ have a particular meaning. Either the indices of $U$ consist of row numbers and $V$ of column numbers, or vice versa. In the former case, a compressed representation is known as ``compressed sparse row.'' In the latter case, it is known as ``compressed sparse column.''
600
600
601
601
\andrew{This code is from nwgraph, need to bring it up to std::graph}
602
-
The following code snippet illustrates a sparse matrix vector product when a compressed adjacency representation is interpreted as a compressed sparse row matrix.
602
+
The following code snippet illustrates a sparse matrix vector product when a compressed adjacency representation is interpreted as a compressed sparse row matrix.
603
603
\begin{lstlisting}[language=C++]
604
604
for (auto&& [row, u_neighbors] : make_neighbor_range(graph)) {
Copy file name to clipboardExpand all lines: D3128_Algorithms/tex/algorithms.tex
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ \subsection{Other Algorithms}
76
76
Additional algorithms that were considered but not included in this proposal are shown in Table \ref{tab:other_algorithms}.
77
77
Tier X algorithms are variations of shortest paths algorithms that complement the Single Source, Multiple Target algorithms
78
78
in this proposal.
79
-
It is assumed that future proposals will include them, thought the exact mix for each proposal will depend on feedback received
79
+
It is assumed that future proposals will include them, though the exact mix for each proposal will depend on feedback received
80
80
and our experience with the current proposal.
81
81
82
82
\phil{We may want to revisit the Driver idea in the future after we have more algorithms.}
@@ -114,7 +114,7 @@ \subsection{Other Algorithms}
114
114
\end{center}
115
115
\end{table}
116
116
117
-
\andrew{All Pairs: Tier 2? People bring this up alot -- but it is very expensive in terms of computation and memory.}
117
+
\andrew{All Pairs: Tier 2? People bring this up a lot -- but it is very expensive in terms of computation and memory.}
118
118
\phil{If it's useful to enough people it should be included. Users can make their own determination of whether they want to use it, based on the cost.}
119
119
120
120
\phil{The same variations for Shortest Paths algorithms can also be useful for topological sort.}
@@ -510,7 +510,7 @@ \subsection{Initialization}
510
510
\begin{itemize}
511
511
\item\lstinline{shortest_path_infinite_distance()} returns the largest distance value,
512
512
typically \lstinline{numeric_limits<DistanceValue>::max()} for numeric types.
513
-
\item\lstinline{shortest_path_zero()} returns a value for for a zero-length path,
513
+
\item\lstinline{shortest_path_zero()} returns a value for a zero-length path,
0 commit comments