original_string: public function reduce( $tolerance )
      {
          $this->_tolerance = $tolerance;
          $sentinelKey = 0;
          while ($sentinelKey < $this->count()-1) {
              $testKey = $sentinelKey + 1;
              while ( $sentinelKey < $this->count()-1
                  && $this->_isInTolerance($sentinelKey, $testKey) ) {
                  unset($this->points[$testKey]);
                  $testKey++;
              }
              $this->reindex();
              $sentinelKey++;
          }
          return $this->reindex();
      }
code: public function reduce( $tolerance )
      {
          $this->_tolerance = $tolerance;
          $sentinelKey = 0;
          while ($sentinelKey < $this->count()-1) {
              $testKey = $sentinelKey + 1;
              while ( $sentinelKey < $this->count()-1
                  && $this->_isInTolerance($sentinelKey, $testKey) ) {
                  unset($this->points[$testKey]);
                  $testKey++;
              }
              $this->reindex();
              $sentinelKey++;
          }
          return $this->reindex();
      }
code_tokens: public function reduce ( $ tolerance ) { $ this -> _tolerance = $ tolerance ; $ sentinelKey = 0 ; while ( $ sentinelKey < $ this -> count ( ) - 1 ) { $ testKey = $ sentinelKey + 1 ; while ( $ sentinelKey < $ this -> count ( ) - 1 && $ this -> _isInTolerance ( $ sentinelKey , $ testKey ) ) { unset ( $ this -> points [ $ testKey ] ) ; $ testKey ++ ; } $ this -> reindex ( ) ; $ sentinelKey ++ ; } return $ this -> reindex ( ) ; }
docstring: Remove points with a distance under a given tolerance.
  
  @param double $tolerance Maximum radial distance between points.
  
  @return array Reduced set of points
docstring_tokens: Remove points with a distance under a given tolerance .