pub fn debug_me(&self, msg: &str) {
        match self.internal() {
            Internal::Empty => println!("empty set: {}", msg),
            Internal::Stack(t) => println!("{}: stack {:?} => {:?}", msg, t, t.collect::<Vec<_>>()),
            Internal::Heap { s, a } => {
                println!("{}: heap {:?}", msg, s);
                for (i,x) in a.iter().cloned().enumerate() {
                    println!("      {} (key {} pov {}): {:0b} ({})",
                             (x >> s.bits)*s.bits, x >> s.bits,
                             p_poverty(x >> s.bits, i, a.len()),
                             x & mask(s.bits as usize), x);
                }
                println!("    => {:?}", self.iter().collect::<Vec<_>>());
            }
            Internal::Big { s, a } => {
                println!("{}: big {:?}\n    {:?}", msg, s, a);
                let v: Vec<_> = a.iter().cloned().map(|x| x % a.len() as u64).collect();
                println!("     >>>{:?}", v);
            }
            Internal::Dense { sz, a } => {
                println!("{}: dense {:?}\n    {:?}\n    => {:?}",
                         msg, sz, a, self.iter().collect::<Vec<u64>>());
                println!("    foo {:?}", self.iter());
            }
        }
    }
/// Print debugging information about this set.
Print debugging information about this set.
Print debugging information about this set .
pub fn debug_me(&self, msg: &str) {
        match self.internal() {
            Internal::Empty => println!("empty set: {}", msg),
            Internal::Stack(t) => println!("{}: stack {:?} => {:?}", msg, t, t.collect::<Vec<_>>()),
            Internal::Heap { s, a } => {
                println!("{}: heap {:?}", msg, s);
                for (i,x) in a.iter().cloned().enumerate() {
                    println!("      {} (key {} pov {}): {:0b} ({})",
                             (x >> s.bits)*s.bits, x >> s.bits,
                             p_poverty(x >> s.bits, i, a.len()),
                             x & mask(s.bits as usize), x);
                }
                println!("    => {:?}", self.iter().collect::<Vec<_>>());
            }
            Internal::Big { s, a } => {
                println!("{}: big {:?}\n    {:?}", msg, s, a);
                let v: Vec<_> = a.iter().cloned().map(|x| x % a.len() as u64).collect();
                println!("     >>>{:?}", v);
            }
            Internal::Dense { sz, a } => {
                println!("{}: dense {:?}\n    {:?}\n    => {:?}",
                         msg, sz, a, self.iter().collect::<Vec<u64>>());
                println!("    foo {:?}", self.iter());
            }
        }
    }
pub fn debug_me ( & self , msg : & str ) { match self . internal ( ) { Internal :: Empty => println ! ( " " msg ) , Internal :: Stack ( t ) => println ! ( " " msg t t collect Vec ( ) ) , Internal :: Heap { s , a } => { println ! ( " " msg s ) ; for ( i , x ) in a . iter ( ) . cloned ( ) . enumerate ( ) { println ! ( " " ( x s bits ) s bits x s bits p_poverty ( x s bits i a len ( ) ) x mask ( s bits as usize ) x ) ; } println ! ( " " self iter ( ) collect Vec ( ) ) ; } Internal :: Big { s , a } => { println ! ( " \n " msg s a ) ; let v : Vec < _ > = a . iter ( ) . cloned ( ) . map ( | x | x % a . len ( ) as u64 ) . collect ( ) ; println ! ( " " v ) ; } Internal :: Dense { sz , a } => { println ! ( " \n \n " msg sz a self iter ( ) collect Vec u64 ( ) ) ; println ! ( " " self iter ( ) ) ; } } }
Print debugging information about this set.
Print debugging information about this set .
&self
msg
&str
&self
msg
&str