function Draw($i = -1)
	{
		if ($i < 0 || $i >= $this->hash_prime)
		{
			$i = 0;
			$j = $this->hash_prime;
		}
		else
		{
			$j = $i + 1;
		}

		echo "Draw the XDB data [$i ~ $j]. (" . trim($this->Version()) . ")\n\n";
		while ($i < $j)
		{
			$poff = $i * 8 + 32;
			fseek($this->fd, $poff, SEEK_SET);
			$buf = fread($this->fd, 8);
			if (strlen($buf) != 8) break;
			$ptr = unpack('Ioff/Ilen', $buf);
			
			$this->_cur_depth = 0;
			$this->_node_num = 0;
			$this->_draw_node($ptr['off'], $ptr['len']);
			echo "-------------------------------------------\n";
			echo "Tree(xdb) [$i] max_depth: {$this->_cur_depth} nodes_num: {$this->_node_num}\n";			
			$i++;
		}
	}
function Draw($i = -1)
	{
		if ($i < 0 || $i >= $this->hash_prime)
		{
			$i = 0;
			$j = $this->hash_prime;
		}
		else
		{
			$j = $i + 1;
		}

		echo "Draw the XDB data [$i ~ $j]. (" . trim($this->Version()) . ")\n\n";
		while ($i < $j)
		{
			$poff = $i * 8 + 32;
			fseek($this->fd, $poff, SEEK_SET);
			$buf = fread($this->fd, 8);
			if (strlen($buf) != 8) break;
			$ptr = unpack('Ioff/Ilen', $buf);
			
			$this->_cur_depth = 0;
			$this->_node_num = 0;
			$this->_draw_node($ptr['off'], $ptr['len']);
			echo "-------------------------------------------\n";
			echo "Tree(xdb) [$i] max_depth: {$this->_cur_depth} nodes_num: {$this->_node_num}\n";			
			$i++;
		}
	}
function Draw ( $ i = - 1 ) { if ( $ i < 0 || $ i >= $ this -> hash_prime ) { $ i = 0 ; $ j = $ this -> hash_prime ; } else { $ j = $ i + 1 ; } echo "Draw the XDB data [$i ~ $j]. (" . trim ( $ this -> Version ( ) ) . ")\n\n" ; while ( $ i < $ j ) { $ poff = $ i * 8 + 32 ; fseek ( $ this -> fd , $ poff , SEEK_SET ) ; $ buf = fread ( $ this -> fd , 8 ) ; if ( strlen ( $ buf ) != 8 ) break ; $ ptr = unpack ( 'Ioff/Ilen' , $ buf ) ; $ this -> _cur_depth = 0 ; $ this -> _node_num = 0 ; $ this -> _draw_node ( $ ptr [ 'off' ] , $ ptr [ 'len' ] ) ; echo "-------------------------------------------\n" ; echo "Tree(xdb) [$i] max_depth: {$this->_cur_depth} nodes_num: {$this->_node_num}\n" ; $ i ++ ; } }
Traversal every tree... & debug to test
Traversal every tree ... & debug to test