2016-08-05 08:20:31 +00:00
|
|
|
<?php
|
|
|
|
|
2016-11-20 21:53:17 +00:00
|
|
|
declare(strict_types=1);
|
2016-08-05 08:20:31 +00:00
|
|
|
|
|
|
|
namespace Phpml\NeuralNetwork\Node;
|
|
|
|
|
|
|
|
use Phpml\NeuralNetwork\Node;
|
|
|
|
|
|
|
|
class Input implements Node
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var float
|
|
|
|
*/
|
|
|
|
private $input;
|
|
|
|
|
|
|
|
public function __construct(float $input = 0.0)
|
|
|
|
{
|
|
|
|
$this->input = $input;
|
|
|
|
}
|
|
|
|
|
2017-11-22 21:16:10 +00:00
|
|
|
public function getOutput(): float
|
2016-08-05 08:20:31 +00:00
|
|
|
{
|
|
|
|
return $this->input;
|
|
|
|
}
|
|
|
|
|
2017-11-14 20:21:23 +00:00
|
|
|
public function setInput(float $input): void
|
2016-08-05 08:20:31 +00:00
|
|
|
{
|
|
|
|
$this->input = $input;
|
|
|
|
}
|
|
|
|
}
|