Newer
Older
//
// Created by fluffymoo on 11.6.18.
//
#include "NeuronBinary.h"
NeuronBinary::NeuronBinary(double threshold) {
this->activation_function_parameters = new double[1];
this->activation_function_parameters[0] = threshold;

Michal Kravcenko
committed
this->edges_in = new std::vector<Connection*>(0);
this->edges_out = new std::vector<Connection*>(0);
void NeuronBinary::activate( ) {
double x = this->potential;
double threshold = this->activation_function_parameters[0];
if(x >= threshold){
this->state = 1.0;
}
else{
this->state = 0.0;
}
}