Completed
Push — develop ( 7062ee...12ee62 )
by Arkadiusz
02:50
created

Input   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 31
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getOutput() 0 4 1
A setInput() 0 4 1
1
<?php
2
3
declare (strict_types = 1);
4
5
namespace Phpml\NeuralNetwork\Node;
6
7
use Phpml\NeuralNetwork\Node;
8
9
class Input implements Node
10
{
11
    /**
12
     * @var float
13
     */
14
    private $input;
15
16
    /**
17
     * @param float $input
18
     */
19
    public function __construct(float $input = 0.0)
20
    {
21
        $this->input = $input;
22
    }
23
24
    /**
25
     * @return float
26
     */
27
    public function getOutput(): float
28
    {
29
        return $this->input;
30
    }
31
32
    /**
33
     * @param float $input
34
     */
35
    public function setInput(float $input)
36
    {
37
        $this->input = $input;
38
    }
39
}
40