Derive hash for BitSet and BitMatrix

This commit is contained in:
Tomasz Miąsko 2021-12-14 00:00:00 +00:00
parent dde825db46
commit d496cca3b1

View File

@ -87,7 +87,7 @@ macro_rules! bit_relations_inherent_impls {
/// to or greater than the domain size. All operations that involve two bitsets
/// will panic if the bitsets have differing domain sizes.
///
#[derive(Eq, PartialEq, Decodable, Encodable)]
#[derive(Eq, PartialEq, Hash, Decodable, Encodable)]
pub struct BitSet<T> {
domain_size: usize,
words: Vec<Word>,
@ -987,7 +987,7 @@ impl<T: Idx> GrowableBitSet<T> {
///
/// All operations that involve a row and/or column index will panic if the
/// index exceeds the relevant bound.
#[derive(Clone, Eq, PartialEq, Decodable, Encodable)]
#[derive(Clone, Eq, PartialEq, Hash, Decodable, Encodable)]
pub struct BitMatrix<R: Idx, C: Idx> {
num_rows: usize,
num_columns: usize,