Skip to content

Commit bfecbfe

Browse files
committed
Fixed docs, change logs, clippy warnings
1 parent 765085c commit bfecbfe

11 files changed

Lines changed: 65 additions & 33 deletions

File tree

algo/CHANGELOG.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
# Change Log
22

3-
## [0.6.0] - 2026-02-10
3+
## [0.6.0] - 2026-02-17
44

55
### Changed
66

7-
* Moved to `rand` 0.10.0.
7+
- Moved to `rand` 0.10.0.
88

99
## [0.5.0] - 2025-11-28
1010

1111
### Changed
1212

13-
* Switched to the 2024 edition.
13+
- Switched to the 2024 edition.
1414

1515
## [0.4.0] - 2025-11-15
1616

1717
### Changed
1818

19-
* Several methods previously accepting a `&ThreadPool` now
19+
- Several methods previously accepting a `&ThreadPool` now
2020
they don't. The user can use the standard rayon global thread pool
2121
or configure their own and use `ThreadPool::install`.
2222

2323
## [0.3.0] -
2424

2525
### Changed
2626

27-
* Visits have been moved to the main WebGraph crate.
27+
- Visits have been moved to the main WebGraph crate.
2828

2929
## [0.2.0] - 2025-05-23
3030

3131
### Changed
3232

33-
* Reviewed constructors of parallel visit to offer default granularity.
33+
- Reviewed constructors of parallel visit to offer default granularity.
3434

35-
* Moved in Layered Label Propagation.
35+
- Moved in Layered Label Propagation.
3636

37-
* Revamped ExactSumSweep implementation.
37+
- Revamped ExactSumSweep implementation.
3838

3939
## [0.1.1] - 2025-04-01
4040

4141
### New
4242

43-
* ExactSumSweep algorithm for eccentricities, radius, and diameter.
43+
- ExactSumSweep algorithm for eccentricities, radius, and diameter.
4444

45-
* Strongly connected components.
45+
- Strongly connected components.
4646

4747
### Fixed
4848

49-
* Fixed crate name.
49+
- Fixed crate name.
5050

5151
## [0.1.0] - 2025-03-31
5252

5353
### New
5454

55-
* First release.
55+
- First release.

algo/README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,32 @@
1010
Algorithms for the Rust implementation of the [WebGraph framework] for graph
1111
compression.
1212

13-
This crate provides efficient algorithms for analyzing compressed graphs:
14-
1513
## Algorithms
1614

1715
### Graph Structure
18-
- **Strongly Connected Components** (SCCs): Tarjan's algorithm and variants for
19-
computing SCCs in directed graphs
20-
- **Topological Sorting**: Order vertices of a directed acyclic graph
21-
- **Acyclicity Testing**: Check if a graph is acyclic
16+
17+
- **Strongly Connected Components** ([SCCs]): [Tarjan's algorithm] and
18+
[Kosaraju's algorithm] for computing SCCs in directed graphs;
19+
[sequential][symm_seq] and [parallel][symm_par] computation
20+
of connected components for symmetric graphs
21+
- **[Topological Sorting]**: Orders vertices of a directed acyclic graph
22+
- **[Acyclicity Testing]**: Checks if a graph is acyclic
2223

2324
### Distance Computation
24-
- **HyperBall**: Probabilistic algorithm for computing distances, closeness
25+
26+
- **[HyperBall]**: Probabilistic algorithm for computing distances, closeness
2527
centrality, and other measures using HyperLogLog counters
26-
- **ExactSumSweep**: Exact computation of eccentricities, radius, and diameter
28+
- **[ExactSumSweep]**: Exact computation of eccentricities, radius, and
29+
diameter
2730

2831
### Community Detection
29-
- **Layered Label Propagation** (LLP): Fast community detection algorithm for
32+
33+
- **[Layered Label Propagation]** (LLP): Fast community detection algorithm for
3034
large graphs
3135

3236
## CLI Integration
3337

34-
Many algorithms can also be accessed through the `webgraph-cli` command-line
35-
tool.
38+
Many algorithms can also be accessed through the [command-line interface].
3639

3740
## Acknowledgments
3841

@@ -43,4 +46,15 @@ opinions expressed are however those of the authors only and do not necessarily
4346
reflect those of the European Union or the Italian MUR. Neither the European
4447
Union nor the Italian MUR can be held responsible for them.
4548

46-
[WebGraph framework]: <https://webgraph.di.unimi.it/>
49+
[SCCs]: https://docs.rs/webgraph-algo/latest/webgraph_algo/sccs/index.html
50+
[Tarjan's algorithm]: https://docs.rs/webgraph-algo/latest/webgraph_algo/sccs/fn.tarjan.html
51+
[Kosaraju's algorithm]: https://docs.rs/webgraph-algo/latest/webgraph_algo/sccs/fn.kosaraju.html
52+
[symm_seq]: https://docs.rs/webgraph-algo/latest/webgraph_algo/sccs/fn.symm_seq.html
53+
[symm_par]: https://docs.rs/webgraph-algo/latest/webgraph_algo/sccs/fn.symm_par.html
54+
[Topological Sorting]: https://docs.rs/webgraph-algo/latest/webgraph_algo/fn.top_sort.html
55+
[Acyclicity Testing]: https://docs.rs/webgraph-algo/latest/webgraph_algo/fn.is_acyclic.html
56+
[HyperBall]: https://docs.rs/webgraph-algo/latest/webgraph_algo/distances/hyperball/struct.HyperBallBuilder.html
57+
[ExactSumSweep]: https://docs.rs/webgraph-algo/latest/webgraph_algo/distances/exact_sum_sweep/index.html
58+
[Layered Label Propagation]: https://docs.rs/webgraph-algo/latest/webgraph_algo/llp/index.html
59+
[command-line interface]: https://docs.rs/webgraph-cli/latest/index.html
60+
[WebGraph framework]: https://webgraph.di.unimi.it/

algo/src/distances/exact_sum_sweep/computer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ impl<
287287
///
288288
/// # Arguments
289289
/// * `pl`: A progress logger.
290-
pub fn compute(&mut self, pl: &mut impl ProgressLog) {
290+
pub(super) fn compute(&mut self, pl: &mut impl ProgressLog) {
291291
if self.num_nodes == 0 {
292292
return;
293293
}

algo/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
*/
77

88
#![doc = include_str!("../README.md")]
9+
#![deny(unstable_features)]
10+
#![deny(trivial_casts)]
11+
#![deny(unconditional_recursion)]
12+
#![deny(clippy::empty_loop)]
13+
#![deny(unreachable_code)]
14+
#![deny(unreachable_pub)]
15+
#![deny(unreachable_patterns)]
16+
#![deny(unused_macro_rules)]
17+
#![deny(unused_doc_comments)]
918
#![allow(clippy::type_complexity)]
1019

1120
#[macro_use]
@@ -22,6 +31,7 @@ pub use top_sort::top_sort;
2231
pub mod distances;
2332
pub mod prelude {
2433
pub use crate::acyclicity::is_acyclic;
34+
pub use crate::distances;
2535
pub use crate::sccs::*;
2636
pub use crate::top_sort::top_sort;
2737
}

algo/src/llp/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ pub fn combine_labels(work_dir: impl AsRef<Path>) -> Result<Box<[usize]>> {
415415
let path_str = path_name.to_string_lossy();
416416
path_str.starts_with("labels_")
417417
&& path_str.ends_with(".bin")
418-
&& path.file_type().unwrap().is_file()
418+
&& path.file_type().is_ok_and(|ft| ft.is_file())
419419
});
420420

421421
let mut num_nodes = None;

cli/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## [0.4.0] - 2026-02-10
3+
## [0.4.0] - 2026-02-17
44

55
### New
66

cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ with compressed graphs. The tool supports:
2020
- **Running** algorithms (Layered Label Propagation)
2121
- **Benchmarking** graph operations
2222

23-
Each module correspond to a group of commands, and each command is
23+
Each module corresponds to a group of commands, and each command is
2424
implemented as a submodule.
2525

2626
## Subcommands

cli/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
*/
88

99
#![doc = include_str!("../README.md")]
10+
#![deny(unstable_features)]
11+
#![deny(trivial_casts)]
12+
#![deny(unconditional_recursion)]
13+
#![deny(clippy::empty_loop)]
14+
#![deny(unreachable_code)]
15+
#![deny(unreachable_pub)]
16+
#![deny(unreachable_patterns)]
17+
#![deny(unused_macro_rules)]
18+
#![deny(unused_doc_comments)]
1019
#![allow(clippy::type_complexity)]
1120

1221
use anyhow::{Context, Result, anyhow, bail, ensure};

webgraph/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## [0.6.0] - 2025-02-10
3+
## [0.6.0] - 2026-02-17
44

55
### New
66

webgraph/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Union nor the Italian MUR can be held responsible for them.
205205
[labeling]: <https://docs.rs/webgraph/latest/webgraph/traits/labels/trait.SequentialLabeling.html>
206206
[iteration]: <https://docs.rs/webgraph/latest/webgraph/traits/labels/trait.SequentialLabeling.html#method.iter>
207207
[retrieve the successors of a node]: <https://docs.rs/webgraph/latest/webgraph/traits/graph/trait.RandomAccessGraph.html#method.successors>
208-
[LAW website]: <http://law.di.unimi.it/>
208+
[LAW web site]: <http://law.di.unimi.it/>
209209
[Elias–Fano]: <sux::dict::EliasFano>
210210
[WebGraph framework]: <https://webgraph.di.unimi.it/>
211211
[ε-serde]: <https://crates.io/crates/epserde/>
@@ -215,5 +215,5 @@ Union nor the Italian MUR can be held responsible for them.
215215
[`BTreeGraph`]: <https://docs.rs/webgraph/latest/webgraph/graphs/btree_graph/struct.BTreeGraph.html>
216216
[`LabeledBTreeGraph`]: <https://docs.rs/webgraph/latest/webgraph/graphs/btree_graph/struct.LabeledBTreeGraph.html>
217217
[Common Crawl web site]: <https://commoncrawl.org/>
218-
[CLI command `webgraph`]: <https://docs.rs/webgraph-cli/latest/index.html>
218+
[command-line interface]: <https://docs.rs/webgraph-cli/latest/index.html>
219219
[`CsrGraph`]: <https://docs.rs/webgraph/latest/webgraph/graphs/csr_graph/struct.CsrGraph.html>

0 commit comments

Comments
 (0)