fn bucket_node(&mut self, node: Node, num_same_bits: usize) {
        let bucket_index = bucket_placement(num_same_bits, self.buckets.len());

        // Try to place in correct bucket
        if !self.buckets[bucket_index].add_node(node.clone()) {
            // Bucket was full, try to split it
            if self.split_bucket(bucket_index) {
                // Bucket split successfully, try to add again
                self.bucket_node(node, num_same_bits);
            }
        }
    }
/// Recursively tries to place the node into some bucket.
Recursively tries to place the node into some bucket.
Recursively tries to place the node into some bucket .
fn bucket_node(&mut self, node: Node, num_same_bits: usize) {
        let bucket_index = bucket_placement(num_same_bits, self.buckets.len());
        // Try to place in correct bucket
        if !self.buckets[bucket_index].add_node(node.clone()) {
            // Bucket was full, try to split it
            if self.split_bucket(bucket_index) {
                // Bucket split successfully, try to add again
                self.bucket_node(node, num_same_bits);
            }
        }
    }
fn bucket_node ( & mut self , node : Node , num_same_bits : usize ) { let bucket_index = bucket_placement ( num_same_bits , self . buckets . len ( ) ) ; // Try to place in correct bucket if ! self . buckets [ bucket_index ] . add_node ( node . clone ( ) ) { // Bucket was full, try to split it if self . split_bucket ( bucket_index ) { // Bucket split successfully, try to add again self . bucket_node ( node , num_same_bits ) ; } } }
Recursively tries to place the node into some bucket.
Recursively tries to place the node into some bucket .
&mut self
node
Node
num_same_bits
usize
&mut self
node
Node
num_same_bits
usize