@@ -21,9 +21,9 @@ |
||
| 21 | 21 | protected $b; |
| 22 | 22 | |
| 23 | 23 | public function setUp() : void { |
| 24 | - $this->a = matrix::uniform(500,500); |
|
| 24 | + $this->a = matrix::uniform(500, 500); |
|
| 25 | 25 | |
| 26 | - $this->b = matrix::uniform(50,50); |
|
| 26 | + $this->b = matrix::uniform(50, 50); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | /** |
| 14 | 14 | * @var \Np\matrix |
| 15 | 15 | */ |
| 16 | - protected $a,$b; |
|
| 16 | + protected $a, $b; |
|
| 17 | 17 | |
| 18 | 18 | public function setUp() : void { |
| 19 | 19 | $this->a = matrix::uniform(500, 500); |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Np\benchmarks\matrix\arithmetic; |
| 4 | 4 | |
| 5 | -use Np\{matrix,vector}; |
|
| 5 | +use Np\{matrix, vector}; |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * @Groups({"Arithmetic"}) |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare (strict_types=1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Np\decompositions; |
| 6 | 6 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public static function getri(\Np\matrix $mat, \Np\vector $ipiv, int $matLayout = self::ROW_MAJOR) { |
| 53 | 53 | self::init(); |
| 54 | - if($mat->dtype == \Np\matrix::FLOAT){ |
|
| 54 | + if ($mat->dtype == \Np\matrix::FLOAT) { |
|
| 55 | 55 | return self::$ffi_lapack->LAPACKE_sgetri($matLayout, $mat->row, $mat->data, $mat->row, $ipiv->data); |
| 56 | 56 | } |
| 57 | 57 | else { |
@@ -136,10 +136,10 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | public static function lange(string $norm, \Np\matrix $m, int $matLayout = self::ROW_MAJOR) { |
| 138 | 138 | self::init(); |
| 139 | - if($m->dtype == \Np\matrix::FLOAT){ |
|
| 139 | + if ($m->dtype == \Np\matrix::FLOAT) { |
|
| 140 | 140 | return self::$ffi_lapack->LAPACKE_slange($matLayout, $norm, $m->row, $m->col, $m->data, $m->col); |
| 141 | 141 | } |
| 142 | - else{ |
|
| 142 | + else { |
|
| 143 | 143 | return self::$ffi_lapack->LAPACKE_dlange($matLayout, $norm, $m->row, $m->col, $m->data, $m->col); |
| 144 | 144 | } |
| 145 | 145 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare (strict_types=1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Np\decompositions; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare (strict_types=1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Np\decompositions; |
| 6 | 6 | |
@@ -8,6 +8,6 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @author ghost |
| 10 | 10 | */ |
| 11 | -class dtypeException extends invalidArgumentException{ |
|
| 11 | +class dtypeException extends invalidArgumentException { |
|
| 12 | 12 | //put your code here |
| 13 | 13 | } |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Np\vector; |
| 6 | 6 | vector::time(); |
| 7 | 7 | vector::getMemory(); |
| 8 | -$v = vector::ar(range(random_int(1,2), random_int(99999,9999999))); |
|
| 8 | +$v = vector::ar(range(random_int(1, 2), random_int(99999, 9999999))); |
|
| 9 | 9 | |
| 10 | 10 | echo $v->sum() . PHP_EOL; |
| 11 | 11 | vector::getMemory(); |