Skip to content

Commit

Permalink
doc: reformat multi-line list items in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Aug 28, 2024
1 parent 3c3f05f commit cb88f5a
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions src/directed/astar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ use crate::FxIndexMap;
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, along with the cost for moving
/// from the node to the successor. This cost must be non-negative.
/// from the node to the successor. This cost must be non-negative.
/// - `heuristic` returns an approximation of the cost from a given node to the goal. The
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down Expand Up @@ -157,11 +157,11 @@ where
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, along with the cost for moving
/// from the node to the successor.
/// from the node to the successor.
/// - `heuristic` returns an approximation of the cost from a given node to the goal. The
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down
2 changes: 1 addition & 1 deletion src/directed/bfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::iter::FusedIterator;
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down
2 changes: 1 addition & 1 deletion src/directed/dfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::iter::FusedIterator;
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, which will be tried in order.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down
8 changes: 4 additions & 4 deletions src/directed/dijkstra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ use std::hash::Hash;
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, along with the cost for moving
/// from the node to the successor. This cost must be non-negative.
/// from the node to the successor. This cost must be non-negative.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down Expand Up @@ -111,7 +111,7 @@ where
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, along with the cost for moving
/// from the node to the successor.
/// from the node to the successor.
///
/// The result is a map where every reachable node (not including `start`) is associated with
/// an optimal parent node and a cost from the start node.
Expand Down Expand Up @@ -158,7 +158,7 @@ where
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, along with the cost for moving
/// from the node to the successor.
/// from the node to the successor.
/// - `stop` is a function which is called every time a node is examined (including `start`).
/// A `true` return value will stop the algorithm.
///
Expand Down
6 changes: 3 additions & 3 deletions src/directed/fringe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ use std::mem;
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, along with the cost for moving
/// from the node to the successor. This cost must be non-negative.
/// from the node to the successor. This cost must be non-negative.
/// - `heuristic` returns an approximation of the cost from a given node to the goal. The
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down
6 changes: 3 additions & 3 deletions src/directed/idastar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ use num_traits::Zero;
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, along with the cost for moving
/// from the node to the successor. This cost must be non-negative.
/// from the node to the successor. This cost must be non-negative.
/// - `heuristic` returns an approximation of the cost from a given node to the goal. The
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// approximation must not be greater than the real cost, or a wrong shortest path may be returned.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down
2 changes: 1 addition & 1 deletion src/directed/iddfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node.
/// - `success` checks whether the goal has been reached. It is not a node as some problems require
/// a dynamic solution instead of a fixed node.
/// a dynamic solution instead of a fixed node.
///
/// A node will never be included twice in the path as determined by the `Eq` relationship.
///
Expand Down
6 changes: 3 additions & 3 deletions src/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl<C: Clone> Matrix<C> {
/// # Errors
///
/// - [`MatrixFormatError::WrongLength`] if the row does not have
/// the expected number of elements.
/// the expected number of elements.
/// - [`MatrixFormatError::EmptyRow`] if an empty row is passed.
pub fn extend(&mut self, row: &[C]) -> Result<(), MatrixFormatError> {
if row.is_empty() {
Expand Down Expand Up @@ -275,9 +275,9 @@ impl<C> Matrix<C> {
/// # Errors
///
/// - [`MatrixFormatError::WrongLength`] if the data length does not
/// correspond to the announced size
/// correspond to the announced size
/// - [`MatrixFormatError::EmptyRow`] if the matrix would contain
/// an empty row
/// an empty row
pub fn from_vec(
rows: usize,
columns: usize,
Expand Down
10 changes: 5 additions & 5 deletions src/undirected/connected_components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ fn find(table: &mut [usize], mut x: usize) -> usize {
/// This function returns a pair containing:
///
/// - A mapping from every vertex to its set identifier. The set identifiers are
/// opaque and will not necessarily be compact. However, it is guaranteed that
/// they will not be greater than the number of groups.
/// opaque and will not necessarily be compact. However, it is guaranteed that
/// they will not be greater than the number of groups.
/// - A mapping from every group to its set identifier, with the identifiers being
/// the same ones as the ones in the previous mapping. Each group corresponds to
/// the identifier at the same index, except for empty group whose identifier is
/// set to `std::usize::MAX`.
/// the same ones as the ones in the previous mapping. Each group corresponds to
/// the identifier at the same index, except for empty group whose identifier is
/// set to `std::usize::MAX`.
///
/// Note that if you have a raw undirected graph, you can build
/// such a structure by creating a group for every vertex containing
Expand Down

0 comments on commit cb88f5a

Please sign in to comment.