Skip to content

Commit e41cdf4

Browse files
committed
Fix tex syntax error
Also fixed spelling and grammar issues. A few code errors were also fixed. (Copilot is amazing!)
1 parent 8f5b7af commit e41cdf4

File tree

8 files changed

+55
-56
lines changed

8 files changed

+55
-56
lines changed

D3126_Overview/tex/overview.tex

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ \section{Overview}
3535
\section{Goals and Priorities}
3636
3737
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.
4140
%
4241
It is informed by the authors' past experience with the Boost Graph Library (BGL), the NWGraph library, the C++
4342
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}}
168167
\section{Impact on the Standard}
169168
This proposal is a pure \textbf{library} extension.
170169
171-
\section{Interaction wtih Other Papers}
170+
\section{Interaction with Other Papers}
172171
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).
173172
Other than these papers, there are no interactions with other proposals to the standard.
174173
@@ -190,7 +189,7 @@ \section{Prior Art}
190189
\textbf{boost::graph} has been an important C++ graph implementation since 2001. It was developed with the goal of providing
191190
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.
192191
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.
194193
195194
\medskip
196195
@@ -199,7 +198,7 @@ \section{Prior Art}
199198
that was more accessible to the average developer. % with the latest algorithms.
200199
201200
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
203202
data structures that could be applied to existing graphs, and there wasn't a uniform approach to properties.
204203
205204
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}
271270
\item[]\tcode{std::ranges/graph}, \tcode{std::ranges::graph::views} and \tcode{std::ranges::graph::edgelist}
272271
\end{itemize}
273272
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.
275274
276275
\section{Notes and Considerations}
277276
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}
298297
\end{itemize}
299298
300299
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
302301
may be a controversial decision. Toward that end, we will continue to include them to help clarify the examples given
303302
and are assumed to be "For exposition only" as suggested implementation until a clear decision to include them, or not,
304303
is made.

D3127_Terminology/tex/terminology_0.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ \subsection{Graph Representation: Enumerating the Vertices}
8585
We summarize some remaining terminology about vertices and edges.
8686
\begin{itemize}
8787
\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
8989
\emph{undirected}, denoted as the (unordered) set $e_k=\{v_i, v_j\}$. The edges
9090
in $E$ are either all directed or all undirected,
9191
corresponding respectively to a \emph{directed graph} or to an \emph{undirected} graph.
@@ -390,7 +390,7 @@ \section{Bipartite Graphs}
390390
%
391391
Thus, a graph, as we have defined it, cannot model the IMDB.
392392
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}\}$,
394394
and the edge set $E$ consists of pairs $(u_i, v_j)$ where $u_i$ is in $U$ and $v_j$ is in $V$.
395395
396396
The \emph{adjacency matrix representation of a structurally bipartite graph} is
@@ -404,7 +404,7 @@ \section{Bipartite Graphs}
404404
\end{array}
405405
\right.
406406
\]
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.
408408
409409
410410
\begin{figure}[ht]
@@ -474,9 +474,9 @@ \section{Partitioned Graphs}
474474
475475
% These are definitely already covered in the examples above.
476476
% \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.}
478478
% \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.}
480480
481481
\section{Regarding Algorithms}
482482
@@ -599,7 +599,7 @@ \section{Graphs and Sparse Matrices}
599599
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.''
600600
601601
\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.
603603
\begin{lstlisting}[language=C++]
604604
for (auto&& [row, u_neighbors] : make_neighbor_range(graph)) {
605605
for (auto&& [col, val] : u_neighbors) {

D3128_Algorithms/tex/algorithms.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ \subsection{Other Algorithms}
7676
Additional algorithms that were considered but not included in this proposal are shown in Table \ref{tab:other_algorithms}.
7777
Tier X algorithms are variations of shortest paths algorithms that complement the Single Source, Multiple Target algorithms
7878
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
8080
and our experience with the current proposal.
8181

8282
\phil{We may want to revisit the Driver idea in the future after we have more algorithms.}
@@ -114,7 +114,7 @@ \subsection{Other Algorithms}
114114
\end{center}
115115
\end{table}
116116

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.}
118118
\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.}
119119

120120
\phil{The same variations for Shortest Paths algorithms can also be useful for topological sort.}
@@ -510,7 +510,7 @@ \subsection{Initialization}
510510
\begin{itemize}
511511
\item \lstinline{shortest_path_infinite_distance()} returns the largest distance value,
512512
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,
514514
typically \lstinline{0} for numeric types.
515515
\end{itemize}
516516
\end{itemdescr}
@@ -762,7 +762,7 @@ \subsubsection{Bellman-Ford Shortest Paths}
762762
%\pnum\result
763763
\pnum\returns
764764
\begin{itemize}
765-
\item \lstinline{optional<vertex_id_t<G>} If no negative weight cycle is found,
765+
\item \lstinline{optional<vertex_id_t<G>>} If no negative weight cycle is found,
766766
there is no associated vertex id. If a negative weight cycle is found, a
767767
vertex id in the cycle is returned. \lstinline{find_negative_cycle}
768768
can be called to get the vertex ids of the cycle.
@@ -824,10 +824,10 @@ \subsubsection{Bellman-Ford Shortest Distances}
824824
%\pnum\result
825825
\pnum\returns
826826
\begin{itemize}
827-
\item \lstinline{optional<vertex_id_t<G>} If no negative weight cycle is found,
827+
\item \lstinline{optional<vertex_id_t<G>>} If no negative weight cycle is found,
828828
there is no associated vertex id. If a negative weight cycle is found, a
829829
vertex id in the cycle is returned. \lstinline{bellman_ford_shortest_paths} must be used
830-
to get the predecessors if it is importantant to get the vertex ids of the cycle
830+
to get the predecessors if it is important to get the vertex ids of the cycle
831831
using \lstinline{find_negative_cycle}.
832832
\end{itemize}
833833
\pnum\complexity $\mathcal{O}(|E| \cdot |V|)$. Complexity may also be affected when visitor events are called. \\
@@ -1162,7 +1162,7 @@ \subsection{Connected Components}
11621162
\item
11631163
\lstinline{component[v]} is the connected component id of vertex \lstinline{v}.
11641164
\item
1165-
There is at least one Connected Component, with compondent id of \lstinline{0}, for \lstinline{num_vertices(g) > 0}.
1165+
There is at least one Connected Component, with component id of \lstinline{0}, for \lstinline{num_vertices(g) > 0}.
11661166
\end{itemize}
11671167
%\pnum\result
11681168
%\pnum\returns
@@ -1497,7 +1497,7 @@ \subsection{Prim Minimum Spanning Tree}
14971497
\item
14981498
\lstinline{size(weight) >= to num_vertices(g)}.
14991499
\item
1500-
\lstinline{size(predecessor >= to num_vertices(g)}.
1500+
\lstinline{size(predecessor) >= num_vertices(g)}.
15011501
\end{itemize}
15021502
\pnum\effects
15031503
\begin{itemize}

D3129_Views/tex/revision.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ \subsection*{\paperno r1}
1313
The range returned by \tcode{edgelist_view} adheres to the \tcode{basic_sourced_index_edgelist} concept,
1414
and to the \tcode{has_edge_value} concept if a \tcode{evf(uv)} function is passed. The same applies to
1515
all \textit{sourced} versions of the BFS, DFS and Topological Sort views.
16-
\item Restore the allocator parameters on the DFS, BFS and Toplogical Sort views, based on feedback and
16+
\item Restore the allocator parameters on the DFS, BFS and Topological Sort views, based on feedback and
1717
by SG14/SG19 joint meeting.
1818
\item Add a note that we will be unable to support a freestanding graph library in this proposal because
1919
of the need for \tcode{stack}, \tcode{queue} and potential \tcode{bad_alloc} exception in many of

D3129_Views/tex/views.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ \section{Introduction}
2424
%
2525

2626
The views in this paper provide common ways that algorithms use to traverse graphs. They are a simple as iterating
27-
through the set of vertices, or more complex ways such as depth-first search and breadth-first search. The also
27+
through the set of vertices, or more complex ways such as depth-first search and breadth-first search. They also
2828
provide a consistent and reliable way to access related elements using the View Return Types, and guaranteeing expected
2929
values, such as that the target is really the target on unordered edges.
3030

@@ -87,7 +87,7 @@ \subsection{\tcode{struct vertex_info<VId, VV>}}\label{vertex-view}\mbox{} \\
8787
\lstinputlisting{D3129_Views/src/vertex_info.hpp}
8888
}
8989

90-
Specializations are defined with \tcode{V=void} or \tcode{VV=void} to suppress the existance of their associated member variables,
90+
Specializations are defined with \tcode{V=void} or \tcode{VV=void} to suppress the existence of their associated member variables,
9191
giving the following valid combinations in Table \ref{tab:vertex-view} . For instance, the second entry, \tcode{vertex_info<VId, void>}
9292
has one member \tcode{\{vertex_type vertex;\}} and \tcode{value_type} is \tcode{void}.
9393
\begin{table}[h!]
@@ -123,7 +123,7 @@ \subsection{\tcode{struct edge_info<VId, Sourced, E, EV>}}\label{edge-view}\mbox
123123
\lstinputlisting{D3129_Views/src/edge_info.hpp}
124124
}
125125

126-
Specializations are defined with \tcode{Sourced=true|false}, \tcode{E=void} or \tcode{EV=void} to suppress the existance of the associated
126+
Specializations are defined with \tcode{Sourced=true|false}, \tcode{E=void} or \tcode{EV=void} to suppress the existence of the associated
127127
member variables, giving the following valid combinations in Table \ref{tab:edge-view} . For instance, the second entry,
128128
\tcode{edge_info<VId,true,E>} has three members \tcode{\{source_id_type source_id; target_id_type target_id; edge_type edge;\}}
129129
and \tcode{value_type} is \tcode{void}.
@@ -161,7 +161,7 @@ \subsection{\tcode{struct neighbor_info<VId, Sourced, V, VV>}}\label{neighbor-vi
161161
\lstinputlisting{D3129_Views/src/neighbor_info.hpp}
162162
}
163163

164-
Specializations are defined with \tcode{Sourced=true|false} or \tcode{EV}=void to suppress the existance of the
164+
Specializations are defined with \tcode{Sourced=true|false} or \tcode{EV}=void to suppress the existence of the
165165
associated member variables, giving the following valid combinations in Table \ref{tab:neighbor-view} . For instance, the second entry,
166166
\tcode{neighbor_info<V,true>} has two members \tcode{\{source_type source; target_type target;\}}
167167
and \tcode{value_type} is \tcode{void}.
@@ -363,7 +363,7 @@ \subsection{Common Types and Functions for ``Search'' }
363363
};
364364

365365
// stop searching from current vertex
366-
template<class S)
366+
template<class S>
367367
void cancel(S search, cancel_search);
368368

369369
// Returns distance from the source vertex to the current vertex,

0 commit comments

Comments
 (0)