Skip to content

Commit

Permalink
style(doc): shorten some first paragraph descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
samueltardieu committed Aug 28, 2024
1 parent 02f36f2 commit f4b18db
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
16 changes: 10 additions & 6 deletions src/directed/astar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ where
}

/// Compute all shortest paths using the [A* search
/// algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). Whereas `astar`
/// (non-deterministic-ally) returns a single shortest path, `astar_bag` returns all shortest paths
/// (in a non-deterministic order).
/// algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm).

/// Whereas `astar` (non-deterministic-ally) returns a single shortest
/// path, `astar_bag` returns all shortest paths (in a
/// non-deterministic order).
///
/// The shortest paths starting from `start` up to a node for which `success` returns `true` are
/// computed and returned in an iterator along with the cost (which, by definition, is the same for
Expand Down Expand Up @@ -273,9 +275,11 @@ where
}

/// Compute all shortest paths using the [A* search
/// algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm). Whereas `astar`
/// (non-deterministic-ally) returns a single shortest path, `astar_bag` returns all shortest paths
/// (in a non-deterministic order).
/// algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm).

/// Whereas `astar` (non-deterministic-ally) returns a single shortest
/// path, `astar_bag` returns all shortest paths (in a
/// non-deterministic order).
///
/// This is a utility function which collects the results of the `astar_bag` function into a
/// vector. Most of the time, it is more appropriate to use `astar_bag` directly.
Expand Down
7 changes: 4 additions & 3 deletions src/directed/dfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ use std::iter::FusedIterator;

/// Compute a path using the [depth-first search
/// algorithm](https://en.wikipedia.org/wiki/Depth-first_search).
/// The path starts from `start` up to a node for which `success` returns `true` is computed and
/// returned along with its total cost, in a `Some`. If no path can be found, `None` is returned
/// instead.
///
/// The path starts from `start` up to a node for which `success`
/// returns `true` is computed and returned along with its total cost,
/// in a `Some`. If no path can be found, `None` is returned instead.
///
/// - `start` is the starting node.
/// - `successors` returns a list of successors for a given node, which will be tried in order.
Expand Down
2 changes: 2 additions & 0 deletions src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use std::iter::FusedIterator;
use std::ops::Sub;

#[derive(Clone)]
/// A rectangular grid.
///
/// Representation of a rectangular grid in which vertices can be added
/// or removed. Edges are automatically created between adjacent vertices.
/// By default, only vertical and horizontal edges are created, unless
Expand Down

0 comments on commit f4b18db

Please sign in to comment.