#include "neurone.h"

Neurone::Neurone(){
    nextNeurone=NULL;
    weight=0.0;
}

Neurone::Neurone(const double w,const Neurone* next){
    nextNeurone=(Neurone*)next;
    weight=(double)w;
}

bool Neurone::getState() const{
    return bool(weight > ACTIVE);
}

double Neurone::getWeight() const{
    return weight;
}

void Neurone::setWeight(const double a){
    weight=a;
}

void Neurone::setNextNeurone(const Neurone* next){
    nextNeurone=(Neurone*)next;
}

Neurone* Neurone::getNextNeurone() const{
    return nextNeurone;
}

void Neurone::operator =(double w){
    weight = w;
}

Neurone& Neurone::operator =(const Neurone& n){
    if(this!=&n){
        weight = n.getWeight();
        nextNeurone = n.getNextNeurone();
    }
    return *this;
}
