Test Setup Failed
Push — master ( 8544cf...91812f )
by Arkadiusz
02:16
created

AverageNode::samplesCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Phpml\Tree\Node;
6
7
class AverageNode extends BinaryNode implements PurityNode, LeafNode
8
{
9
    /**
10
     * @var float
11
     */
12
    private $outcome;
13
14
    /**
15
     * @var float
16
     */
17
    private $impurity;
18
19
    /**
20
     * @var int
21
     */
22
    private $samplesCount;
23
24
    public function __construct(float $outcome, float $impurity, int $samplesCount)
25
    {
26
        $this->outcome = $outcome;
27
        $this->impurity = $impurity;
28
        $this->samplesCount = $samplesCount;
29
    }
30
31
    public function outcome(): float
32
    {
33
        return $this->outcome;
34
    }
35
36
    public function impurity(): float
37
    {
38
        return $this->impurity;
39
    }
40
41
    public function samplesCount(): int
42
    {
43
        return $this->samplesCount;
44
    }
45
}
46