private function quickSort($min, $max) {

        $i = $min;
        $j = $max;

        $pivot = $this->values[$min + ($max - $min) / 2];

        while ($i <= $j) {

            while (true === $this->functor->compare($this->values[$i], $pivot)) {
                ++$i;
            }

            while (true === $this->functor->compare($pivot, $this->values[$j])) {
                --$j;
            }

            if ($i <= $j) {
                $this->swap($i, $j);
                ++$i;
                --$j;
            }
        }

        if ($min < $j) {
            $this->quickSort($min, $j);
        }
        if ($i < $max) {
            $this->quickSort($i, $max);
        }
    }
private function quickSort($min, $max) {

        $i = $min;
        $j = $max;

        $pivot = $this->values[$min + ($max - $min) / 2];

        while ($i <= $j) {

            while (true === $this->functor->compare($this->values[$i], $pivot)) {
                ++$i;
            }

            while (true === $this->functor->compare($pivot, $this->values[$j])) {
                --$j;
            }

            if ($i <= $j) {
                $this->swap($i, $j);
                ++$i;
                --$j;
            }
        }

        if ($min < $j) {
            $this->quickSort($min, $j);
        }
        if ($i < $max) {
            $this->quickSort($i, $max);
        }
    }
private function quickSort ( $ min , $ max ) { $ i = $ min ; $ j = $ max ; $ pivot = $ this -> values [ $ min + ( $ max - $ min ) / 2 ] ; while ( $ i <= $ j ) { while ( true === $ this -> functor -> compare ( $ this -> values [ $ i ] , $ pivot ) ) { ++ $ i ; } while ( true === $ this -> functor -> compare ( $ pivot , $ this -> values [ $ j ] ) ) { -- $ j ; } if ( $ i <= $ j ) { $ this -> swap ( $ i , $ j ) ; ++ $ i ; -- $ j ; } } if ( $ min < $ j ) { $ this -> quickSort ( $ min , $ j ) ; } if ( $ i < $ max ) { $ this -> quickSort ( $ i , $ max ) ; } }
Quick sort the values.

@param int $min The min index.
@param int $max The max index.
@return void
Quick sort the values .