mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-09-27 22:49:04 +00:00
40 lines
574 B
PHP
40 lines
574 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;
|
|
}
|
|
}
|