dotMatrixBench   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A dot() 0 2 1
1
<?php
2
3
namespace Np\benchmarks\matrix\lineAlgb;
4
5
use Np\matrix;
6
7
/**
8
 * @Groups({"LinearAlgebra"})
9
 * @BeforeMethods({"setUp"})
10
 */
11
class dotMatrixBench {
12
13
    /**
14
     * @var \Np\matrix
15
     */
16
    protected $a;
17
18
    /**
19
     * @var \Np\matrix
20
     */
21
    protected $b;
22
23
    public function setUp(): void {
24
        $this->a = matrix::uniform(500, 500);
25
26
        $this->b = matrix::uniform(500, 500);
27
    }
28
29
    /**
30
     * @Subject
31
     * @Iterations(5)
32
     * @Revs(5)
33
     * @OutputTimeUnit("seconds", precision=3)
34
     */
35
    public function dot(): void {
36
        $this->a->dot($this->b);
37
    }
38
39
}
40