@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @param \Np\matrix|\Np\vector $d |
| 24 | 24 | * @return matrix|vector |
| 25 | 25 | */ |
| 26 | - public function dot(matrix|vector $d): matrix|vector { |
|
| 26 | + public function dot(matrix | vector $d): matrix | vector { |
|
| 27 | 27 | if ($this instanceof matrix) { |
| 28 | 28 | if ($d instanceof self) { |
| 29 | 29 | return $this->dotMatrix($d); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @return \Np\matrix |
| 44 | 44 | */ |
| 45 | 45 | protected function dotMatrix(matrix $matrix): matrix { |
| 46 | - if ($this->checkDtype($this, $matrix) && $this->checkDimensions($this,$matrix)) { |
|
| 46 | + if ($this->checkDtype($this, $matrix) && $this->checkDimensions($this, $matrix)) { |
|
| 47 | 47 | $ar = self::factory($this->row, $this->col, $this->dtype); |
| 48 | 48 | blas::gemm($this, $matrix, $ar); |
| 49 | 49 | return $ar; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * Compute the multiplicative inverse of the matrix. |
| 69 | 69 | * @return matrix|null |
| 70 | 70 | */ |
| 71 | - public function inverse(): matrix|null { |
|
| 71 | + public function inverse(): matrix | null { |
|
| 72 | 72 | if (!$this->isSquare()) { |
| 73 | 73 | self::_err('Error::invalid Size of matrix!'); |
| 74 | 74 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * Compute the (Moore-Penrose) pseudo inverse of the general matrix. |
| 93 | 93 | * @return matrix|null |
| 94 | 94 | */ |
| 95 | - public function pseudoInverse(): matrix|null { |
|
| 95 | + public function pseudoInverse(): matrix | null { |
|
| 96 | 96 | $k = min($this->row, $this->col); |
| 97 | 97 | $s = vector::factory($k, $this->dtype); |
| 98 | 98 | $u = self::factory($this->row, $this->row, $this->dtype); |
@@ -19,11 +19,11 @@ |
||
| 19 | 19 | |
| 20 | 20 | class ref { |
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * |
|
| 24 | - * @param \Np\matrix $m |
|
| 25 | - * @return matrix|null |
|
| 26 | - */ |
|
| 22 | + /** |
|
| 23 | + * |
|
| 24 | + * @param \Np\matrix $m |
|
| 25 | + * @return matrix|null |
|
| 26 | + */ |
|
| 27 | 27 | public static function factory(\Np\matrix $m): matrix|null { |
| 28 | 28 | $ipiv = vector::factory(min($m->row, $m->col), vector::INT); |
| 29 | 29 | $ar = $m->copy(); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @param \Np\matrix $m |
| 25 | 25 | * @return matrix|null |
| 26 | 26 | */ |
| 27 | - public static function factory(\Np\matrix $m): matrix|null { |
|
| 27 | + public static function factory(\Np\matrix $m): matrix | null { |
|
| 28 | 28 | $ipiv = vector::factory(min($m->row, $m->col), vector::INT); |
| 29 | 29 | $ar = $m->copy(); |
| 30 | 30 | $lp = lapack::getrf($ar, $ipiv); |