CArray with evenly spaced numbers over a specified interval.

@param $start    The starting value of the sequence.
@param $stop     The end value of the sequence
@param int $num  Number of samples to generate. Default is 50.

@return \CArray
40
public static function linspace($start, $stop, int $num): \CArray
    {
        return parent::linspace($start, $stop, $num);
    }
572758
public function overflow($key, $start = null, $stop = null)
    {
        return $this->_getClient()->lTrim($key, $start, $stop);
    }
1288569
public function year_range($start_year = 0, $separator = ' - ')
    {

        if(! is_numeric($start_year)){
            throw new InvalidArgumentException("Invalid Argument Format passed . It should be a number");
        }

        if( $start_year < 0){
            throw new InvalidArgumentException("Invalid Argument passed {$start_year} . It shouldn't be a negative value");
        }

        if( $start_year == 0){
            return $this->current_year();
        }

      return ($start_year == $this->current_year()) ? $this->current_year() : $start_year . $separator . $this->current_year();
    }
1141360
public static function getRangeMem( $start, $end, $dec = 2 )
	{
		if( !isset( self::$mem['mem'][$end] ) ){
			self::$mem['mem'][$end] = memory_get_usage();
		}
		$size = self::$mem['mem'][$end] - self::$mem['mem'][$start];
		$a    = ['B', 'KB', 'MB', 'GB', 'TB'];
		$pos  = 0;
		while( $size >= 1024 ){
			$size /= 1024;
			$pos ++;
		}
		return round( $size, $dec )." ".$a[$pos];
	}
1219262
public function mid($column, int $start = 1, string $alias = null, int $length = 0): self
    {
        return $this->column((new Expression())->mid($column, $start, $length), $alias);
    }
444816
public function slice ($start, $end)
	{
		if (!is_numeric($start)) {
			$start = var_export($start, true);

			throw new \OutOfBoundsException("Invalid start index {$start}");
		}

		if (!is_numeric($end)) {
			$end = var_export($end, true);

			throw new \OutOfBoundsException("Invalid end index {$end}");
		}

		return V(array_slice($this->storage, $start, ($end - $start)));
	}
798701
public static function randomCharRange( $start, $end )
	{
		if ( count( static::$randomCharMap ) == 0 )
			static::populate();

		return chr( random_int( $start, $end ) );
	}
139373
public static function ceil($num, int $precision=0) {
		ref\format::ceil($num, $precision);
		return $num;
	}
430847
public static function from(Date $start, $amount)
	{
		return self::cast(DateTimeRange::from(new DateTime($start), $amount, new DateInterval('P1D')));
	}
858814
public function fill(int $start, int $num, $value): self
    {
        return new static(array_fill($start, $num, $value));
    }
1280802
public static function getMemPeak( $start, $end, $dec = 2 )
	{
		if( !isset( self::$mem['peak'][$end] ) ){
			self::$mem['peak'][$end] = memory_get_peak_usage();
		}
		$size = self::$mem['peak'][$end] - self::$mem['peak'][$start];
		$a    = ['B', 'KB', 'MB', 'GB', 'TB'];
		$pos  = 0;
		while( $size >= 1024 ){
			$size /= 1024;
			$pos ++;
		}
		return round( $size, $dec )." ".$a[$pos];
	}
762137
public function setRange(int $start, int $end) : void
    {
        if ($end < $start) {
            throw new InvalidArgumentException('End must be greater or equal to start');
        }

        if ($end === $start) {
            return;
        }

        --$end;

        $firstInt = $start >> 5;
        $lastInt = $end >> 5;

        for ($i = $firstInt; $i <= $lastInt; ++$i) {
            $firstBit = $i > $firstInt ? 0 : $start & 0x1f;
            $lastBit = $i < $lastInt ? 31 : $end & 0x1f;

            if (0 === $firstBit && 31 === $lastBit) {
                $mask = 0x7fffffff;
            } else {
                $mask = 0;

                for ($j = $firstBit; $j < $lastBit; ++$j) {
                    $mask |= 1 << $j;
                }
            }

            $this->bits[$i] = $this->bits[$i] | $mask;
        }
    }
817183
public function range($stop=null) {
    $args = self::_wrapArgs(func_get_args(), 1);
    
    $__ = new self;
    $args = $__->reject($args, function($val) {
      return is_null($val);
    });
    
    $num_args = count($args);
    switch($num_args) {
      case 1: 
        list($start, $stop, $step) = array(0, $args[0], 1);
        break;
      case 2:
        list($start, $stop, $step) = array($args[0], $args[1], 1);
        if($stop < $start) return self::_wrap(array());
        break;
      default:
        list($start, $stop, $step) = array($args[0], $args[1], $args[2]);
        if($step > 0 && $step > $stop) return self::_wrap(array($start));
    }
    $results = range($start, $stop, $step);
    
    // Switch inclusive to exclusive
    if($step > 0 && $__->last($results) >= $stop) array_pop($results);
    elseif($step < 0 && $__->last($results) <= $stop) array_pop($results);
    
    return self::_wrap($results);
  }
434439
public function limit($start, $offset = null) {
        $this->_limit = ' LIMIT ' . $start;
        
        if (!is_null($offset)) {
            $this->_limit .= ', ' . $offset;    
        }
        
        return $this;
    }
1342971
public function slice(int $start=0, $end=null)
    {
        if ($end === null) {
            $end = $this->length();
        }
        if ($end > 0) {
            $end -= $start;
        } elseif ($end === 0) {
            return new Buffer([]);
        }
        $sliced = array_slice($this->data, $start, $end);
        return new Buffer($sliced);
    }
640403
public static function getNextWhitespace($string, $start = -1)
    {
        while ($start < (strlen($string) - 1) && !self::isWhitespace($string[$start + 1])) {
            $start++;
        }

        if ($start === (strlen($string) - 1)) {
            return false;
        }

        $start++;

        return $start;
    }
1154525
public function lTrim($key, $start, $stop) {
        return $this->getHandler($this->judge(__FUNCTION__))->lTrim($key, $start, $stop);
    }