Skip to content

Commit

Permalink
Auto merge of #88272 - willcrichton:mutable-sparse-matrix, r=ecstatic…
Browse files Browse the repository at this point in the history
…-morse

Add bit removal methods to SparseBitMatrix and factor *BitSet relational methods into more extensible trait

I need the ability to clear the bits out of a row from `SparseBitMatrix`. Currently, all the mutating methods only allow insertion of bits, and there is no way to get access to the underlying data.

One approach is simply to make `ensure_row` public, since it grants `&mut` access to the underlying `HybridBitSet`. This PR adds the `pub` modifier. However, presumably this method was private for a reason, so I'm open to other designs. I would prefer general mutable access to the rows, because that way I can add many mutating operations (`clear`, `intersect`, etc.) without filing a PR each time :-)

r? `@ecstatic-morse`
  • Loading branch information
bors committed Sep 1, 2021
2 parents c4f26b1 + e340a0e commit 608b5e1
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 129 deletions.
Loading

0 comments on commit 608b5e1

Please sign in to comment.