@@ -1545,7 +1545,7 @@ where
1545
1545
C : Idx ,
1546
1546
{
1547
1547
num_columns : usize ,
1548
- rows : IndexVec < R , Option < ChunkedBitSet < C > > > ,
1548
+ rows : IndexVec < R , Option < BitSet < C > > > ,
1549
1549
}
1550
1550
1551
1551
impl < R : Idx , C : Idx > SparseBitMatrix < R , C > {
@@ -1554,10 +1554,10 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
1554
1554
Self { num_columns, rows : IndexVec :: new ( ) }
1555
1555
}
1556
1556
1557
- fn ensure_row ( & mut self , row : R ) -> & mut ChunkedBitSet < C > {
1558
- // Instantiate any missing rows up to and including row `row` with an empty ChunkedBitSet .
1559
- // Then replace row `row` with a full ChunkedBitSet if necessary.
1560
- self . rows . get_or_insert_with ( row, || ChunkedBitSet :: new_empty ( self . num_columns ) )
1557
+ fn ensure_row ( & mut self , row : R ) -> & mut BitSet < C > {
1558
+ // Instantiate any missing rows up to and including row `row` with an empty `BitSet` .
1559
+ // Then replace row `row` with a full `BitSet` if necessary.
1560
+ self . rows . get_or_insert_with ( row, || BitSet :: new_empty ( self . num_columns ) )
1561
1561
}
1562
1562
1563
1563
/// Sets the cell at `(row, column)` to true. Put another way, insert
@@ -1631,7 +1631,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
1631
1631
self . row ( row) . into_iter ( ) . flat_map ( |r| r. iter ( ) )
1632
1632
}
1633
1633
1634
- pub fn row ( & self , row : R ) -> Option < & ChunkedBitSet < C > > {
1634
+ pub fn row ( & self , row : R ) -> Option < & BitSet < C > > {
1635
1635
self . rows . get ( row) ?. as_ref ( )
1636
1636
}
1637
1637
@@ -1641,7 +1641,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
1641
1641
/// Returns true if the row was changed.
1642
1642
pub fn intersect_row < Set > ( & mut self , row : R , set : & Set ) -> bool
1643
1643
where
1644
- ChunkedBitSet < C > : BitRelations < Set > ,
1644
+ BitSet < C > : BitRelations < Set > ,
1645
1645
{
1646
1646
match self . rows . get_mut ( row) {
1647
1647
Some ( Some ( row) ) => row. intersect ( set) ,
@@ -1655,7 +1655,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
1655
1655
/// Returns true if the row was changed.
1656
1656
pub fn subtract_row < Set > ( & mut self , row : R , set : & Set ) -> bool
1657
1657
where
1658
- ChunkedBitSet < C > : BitRelations < Set > ,
1658
+ BitSet < C > : BitRelations < Set > ,
1659
1659
{
1660
1660
match self . rows . get_mut ( row) {
1661
1661
Some ( Some ( row) ) => row. subtract ( set) ,
@@ -1669,7 +1669,7 @@ impl<R: Idx, C: Idx> SparseBitMatrix<R, C> {
1669
1669
/// Returns true if the row was changed.
1670
1670
pub fn union_row < Set > ( & mut self , row : R , set : & Set ) -> bool
1671
1671
where
1672
- ChunkedBitSet < C > : BitRelations < Set > ,
1672
+ BitSet < C > : BitRelations < Set > ,
1673
1673
{
1674
1674
self . ensure_row ( row) . union ( set)
1675
1675
}
0 commit comments