compute() public method

public compute ( float | integer $value ) : float
$value float | integer
return float
Example #1
0
 /**
  * @return float
  */
 public function getOutput() : float
 {
     if (0 === $this->output) {
         $sum = 0;
         foreach ($this->synapses as $synapse) {
             $sum += $synapse->getOutput();
         }
         $this->output = $this->activationFunction->compute($sum);
     }
     return $this->output;
 }