Passed
Push — main ( 682a0c...88a3bd )
by Shubham
11:02
created
src/linAlg.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/reductions/ref.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.