public function search(array $sample) : ?Neighborhood
    {
        $current = $this->root;

        while ($current) {
            if ($current instanceof Coordinate) {
                if ($sample[$current->column()] < $current->value()) {
                    $current = $current->left();
                } else {
                    $current = $current->right();
                }

                continue 1;
            }

            if ($current instanceof Neighborhood) {
                return $current;
            }
        }

        return null;
    }
public function search(array $sample) : ?Neighborhood
    {
        $current = $this->root;

        while ($current) {
            if ($current instanceof Coordinate) {
                if ($sample[$current->column()] < $current->value()) {
                    $current = $current->left();
                } else {
                    $current = $current->right();
                }

                continue 1;
            }

            if ($current instanceof Neighborhood) {
                return $current;
            }
        }

        return null;
    }
public function search ( array $ sample ) : ? Neighborhood { $ current = $ this -> root ; while ( $ current ) { if ( $ current instanceof Coordinate ) { if ( $ sample [ $ current -> column ( ) ] < $ current -> value ( ) ) { $ current = $ current -> left ( ) ; } else { $ current = $ current -> right ( ) ; } continue 1 ; } if ( $ current instanceof Neighborhood ) { return $ current ; } } return null ; }
Search the tree for a neighborhood and return an array of samples and
labels.

@param array $sample
@return \Rubix\ML\Graph\Nodes\Neighborhood|null
Search the tree for a neighborhood and return an array of samples and labels .