Skip to content

Commit

Permalink
release: 0.76.0
Browse files Browse the repository at this point in the history
Added

- Add benchmark `biclique`.
- Add benchmark `circuit`.
- Add benchmark `complete`.
- Add benchmark `cycle`.
- Add benchmark `empty`.
- Add benchmark `path`.
- Add benchmark `random_tournament`.
- Add benchmark `star`.
- Add property test `random_tournament_has_arc` for `adjacency_list`.
- Add property test `random_tournament_has_arc` for `adjacency_matrix`.

Changed

- Breaking: remove `Biclique` blanket implementation for `D: AddArc + Empty`.
- Improve performance of `Biclique::biclique` for `adjacency_list`.
- Remove `sample_size` attribute from `single_source_distances` benchmarks.
  • Loading branch information
basdirks-purple committed Aug 3, 2024
1 parent 0b73d21 commit 0363140
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- Implement `Debug` for `adjacency_list_weighted::Digraph` to show arcs.
- Implement `Debug` for `adjacency_matrix::Digraph` to show arcs.

## [0.75.5] - 2024-08-03
## [0.76.0] - 2024-08-03

Added

Expand All @@ -39,6 +39,7 @@ Added

Changed

- Breaking: remove `Biclique` blanket implementation for `D: AddArc + Empty`.
- Improve performance of `Biclique::biclique` for `adjacency_list`.
- Remove `sample_size` attribute from `single_source_distances` benchmarks.

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "graaf"
version = "0.75.5"
version = "0.76.0"
edition = "2021"
authors = ["Bas Dirks <bas.dirks@protonmail.com>"]
categories = ["algorithms", "data-structures", "mathematics"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Add the following to your `Cargo.toml`:

```toml
[dependencies]
graaf = "0.75.5"
graaf = "0.76.0"
```

## Digraph Types
Expand Down
34 changes: 16 additions & 18 deletions src/gen/biclique.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,36 +70,34 @@
/// # How can I implement `Biclique`?
///
/// Provide an implementation of `biclique` that generates a complete bipartite
/// digraph with two partitions of `m` and `n` vertices OR implement `AddArc`
/// and `Empty`.
/// digraph with two partitions of `m` and `n` vertices.
///
/// ```
/// use {
/// graaf::{
/// gen::{
/// Biclique,
/// Empty,
/// },
/// op::AddArc,
/// },
/// graaf::gen::Biclique,
/// std::collections::BTreeSet,
/// };
///
/// struct Digraph {
/// arcs: Vec<BTreeSet<usize>>,
/// }
///
/// impl AddArc for Digraph {
/// fn add_arc(&mut self, u: usize, v: usize) {
/// self.arcs[u].insert(v);
/// }
/// }
/// impl Biclique for Digraph {
/// fn biclique(m: usize, n: usize) -> Self {
/// let order = m + n;
/// let clique_1 = (0..m).collect::<BTreeSet<_>>();
/// let clique_2 = (m..order).collect::<BTreeSet<_>>();
/// let mut arcs = vec![BTreeSet::new(); order];
///
/// impl Empty for Digraph {
/// fn empty(order: usize) -> Self {
/// Self {
/// arcs: vec![BTreeSet::new(); order],
/// for u in 0..m {
/// arcs[u].clone_from(&clique_2);
/// }
///
/// for v in m..order {
/// arcs[v].clone_from(&clique_1);
/// }
///
/// Self { arcs }
/// }
/// }
///
Expand Down

0 comments on commit 0363140

Please sign in to comment.