MCordingley\LinearAlgebra\Matrix::concatenateRight PHP Method

concatenateRight() public method

public concatenateRight ( self $other ) : self
$other self
return self
    public function concatenateRight(self $other) : self
    {
        return $this->spliceColumns($this->getColumnCount(), 0, $other->toArray());
    }

Usage Example

Example #1
0
 public function testConcatenateRightWrongSizes()
 {
     $matrixA = new Matrix([[1, 2, 3]]);
     $matrixB = new Matrix([[4], [5], [6]]);
     static::expectException(MatrixException::class);
     $matrixA->concatenateRight($matrixB);
 }