protected function subtractVector(Vector $b) : self
    {
        if ($this->n !== $b->size()) {
            throw new DimensionalityMismatchException('Vector A requires'
                . " $this->n elements but Vector B has {$b->size()}.");
        }

        $c = [];

        foreach ($this->a as $i => $value) {
            $c[] = $value - $b[$i];
        }

        return static::quick($c);
    }
protected function subtractVector(Vector $b) : self
    {
        if ($this->n !== $b->size()) {
            throw new DimensionalityMismatchException('Vector A requires'
                . " $this->n elements but Vector B has {$b->size()}.");
        }

        $c = [];

        foreach ($this->a as $i => $value) {
            $c[] = $value - $b[$i];
        }

        return static::quick($c);
    }
protected function subtractVector ( Vector $ b ) : self { if ( $ this -> n !== $ b -> size ( ) ) { throw new DimensionalityMismatchException ( 'Vector A requires' . " $this->n elements but Vector B has {$b->size()}." ) ; } $ c = [ ] ; foreach ( $ this -> a as $ i => $ value ) { $ c [ ] = $ value - $ b [ $ i ] ; } return static :: quick ( $ c ) ; }
Subtract a vector from this vector.

@param \Rubix\Tensor\Vector $b
@throws \Rubix\Tensor\Exceptions\DimensionalityMismatchException
@return self
Subtract a vector from this vector .