add From impls for BitSet and GrowableBitSet
This commit is contained in:
parent
2d1e075079
commit
3e9d3d917a
1 changed files with 12 additions and 0 deletions
|
@ -340,6 +340,12 @@ impl<T: Idx> BitRelations<BitSet<T>> for BitSet<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T: Idx> From<GrowableBitSet<T>> for BitSet<T> {
|
||||||
|
fn from(bit_set: GrowableBitSet<T>) -> Self {
|
||||||
|
bit_set.bit_set
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A fixed-size bitset type with a partially dense, partially sparse
|
/// A fixed-size bitset type with a partially dense, partially sparse
|
||||||
/// representation. The bitset is broken into chunks, and chunks that are all
|
/// representation. The bitset is broken into chunks, and chunks that are all
|
||||||
/// zeros or all ones are represented and handled very efficiently.
|
/// zeros or all ones are represented and handled very efficiently.
|
||||||
|
@ -1469,6 +1475,12 @@ impl<T: Idx> GrowableBitSet<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T: Idx> From<BitSet<T>> for GrowableBitSet<T> {
|
||||||
|
fn from(bit_set: BitSet<T>) -> Self {
|
||||||
|
Self { bit_set }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// A fixed-size 2D bit matrix type with a dense representation.
|
/// A fixed-size 2D bit matrix type with a dense representation.
|
||||||
///
|
///
|
||||||
/// `R` and `C` are index types used to identify rows and columns respectively;
|
/// `R` and `C` are index types used to identify rows and columns respectively;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue