ReducedStandardDeviationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A itTransformsStandardDeviationBitmapsToReducedStandardDeviationBitmaps() 0 9 1
1
<?php
2
3
namespace Undemanding\Difference\Test\Transformation;
4
5
use Undemanding\Difference\Calculation\Average;
6
use Undemanding\Difference\Calculation\StandardDeviation;
7
use Undemanding\Difference\Test\Test;
8
use Undemanding\Difference\Transformation\ReducedStandardDeviation;
9
10
class ReducedStandardDeviationTest extends Test
11
{
12
    /**
13
     * @test
14
     */
15
    public function itTransformsStandardDeviationBitmapsToReducedStandardDeviationBitmaps()
16
    {
17
        $transformation = new ReducedStandardDeviation();
18
19
        $bitmap1 = [[0.25, 1], [0.25, 0.25]];
20
        $expected1 = [[0, 1], [0, 0]];
21
22
        $this->assertEquals($expected1, $transformation($bitmap1, 2, 2, 0.38));
23
    }
24
}
25