mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-11 08:10:56 +00:00
40 lines
577 B
PHP
40 lines
577 B
PHP
|
<?php
|
||
|
|
||
|
declare (strict_types = 1);
|
||
|
|
||
|
namespace Phpml\NeuralNetwork\Node;
|
||
|
|
||
|
use Phpml\NeuralNetwork\Node;
|
||
|
|
||
|
class Input implements Node
|
||
|
{
|
||
|
/**
|
||
|
* @var float
|
||
|
*/
|
||
|
private $input;
|
||
|
|
||
|
/**
|
||
|
* @param float $input
|
||
|
*/
|
||
|
public function __construct(float $input = 0.0)
|
||
|
{
|
||
|
$this->input = $input;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return float
|
||
|
*/
|
||
|
public function getOutput(): float
|
||
|
{
|
||
|
return $this->input;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param float $input
|
||
|
*/
|
||
|
public function setInput(float $input)
|
||
|
{
|
||
|
$this->input = $input;
|
||
|
}
|
||
|
}
|