protected function multiplyColumnVector(ColumnVector $b) : self
    {
        if ($b->m() !== $this->m) {
            throw new DimensionalityMismatchException('Matrix A requires'
                . " $this->m rows but Vector B has {$b->m()}.");
        }

        $c = [];

        foreach ($this->a as $i => $row) {
            $valueB = $b[$i];
            
            $temp = [];

            foreach ($row as $valueA) {
                $temp[] = $valueA * $valueB;
            }

            $c[] = $temp;
        }

        return self::quick($c);
    }
protected function multiplyColumnVector(ColumnVector $b) : self
    {
        if ($b->m() !== $this->m) {
            throw new DimensionalityMismatchException('Matrix A requires'
                . " $this->m rows but Vector B has {$b->m()}.");
        }

        $c = [];

        foreach ($this->a as $i => $row) {
            $valueB = $b[$i];
            
            $temp = [];

            foreach ($row as $valueA) {
                $temp[] = $valueA * $valueB;
            }

            $c[] = $temp;
        }

        return self::quick($c);
    }
protected function multiplyColumnVector ( ColumnVector $ b ) : self { if ( $ b -> m ( ) !== $ this -> m ) { throw new DimensionalityMismatchException ( 'Matrix A requires' . " $this->m rows but Vector B has {$b->m()}." ) ; } $ c = [ ] ; foreach ( $ this -> a as $ i => $ row ) { $ valueB = $ b [ $ i ] ; $ temp = [ ] ; foreach ( $ row as $ valueA ) { $ temp [ ] = $ valueA * $ valueB ; } $ c [ ] = $ temp ; } return self :: quick ( $ c ) ; }
Multiply this matrix with a column vector.

@param \Rubix\Tensor\ColumnVector $b
@throws \Rubix\Tensor\Exceptions\DimensionalityMismatchException
@return self
Multiply this matrix with a column vector .