Passed
Push — main ( 748618...1afffd )
by Shubham
10:21
created
src/linAlgb/linAlg.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 declare(strict_types=1);
3 3
 namespace Np\linAlgb;
4 4
 
5
-use Np\core\{blas,lapack};
5
+use Np\core\{blas, lapack};
6 6
 use Np\matrix, Np\vector;
7 7
 /**
8 8
  * Linear Algebra
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @param \Np\matrix|\Np\vector $d
25 25
      * @return matrix|vector|float
26 26
      */
27
-    public function dot(matrix|vector $d): matrix|vector|float {
27
+    public function dot(matrix | vector $d): matrix | vector | float {
28 28
         if ($this instanceof matrix) {
29 29
             if ($d instanceof matrix) {
30 30
                 return $this->dotMatrix($d);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * @return \Np\matrix
41 41
      */
42 42
     protected function dotMatrix(matrix $matrix): matrix {
43
-        if ($this->checkDimensions($this,$matrix)) {
43
+        if ($this->checkDimensions($this, $matrix)) {
44 44
             $ar = self::factory($this->row, $matrix->col);
45 45
             blas::gemm($this, $matrix, $ar);
46 46
             return $ar;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * Compute the multiplicative inverse of the matrix.
66 66
      * @return matrix|null
67 67
      */
68
-    public function inverse(): matrix|null {
68
+    public function inverse(): matrix | null {
69 69
         if ($this->isSquare()) {
70 70
             $imat = $this->copy();
71 71
             $ipiv = vector::factory($this->row, vector::INT);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * Compute the (Moore-Penrose) pseudo inverse of the general matrix.
90 90
      * @return matrix|null
91 91
      */
92
-    public function pseudoInverse(): matrix|null {
92
+    public function pseudoInverse(): matrix | null {
93 93
         $k = min($this->row, $this->col);
94 94
         $s = vector::factory($k);
95 95
         $u = self::factory($this->row, $this->row);
Please login to merge, or discard this patch.