init commit

This commit is contained in:
2024-11-12 17:41:10 +01:00
parent 1e4f1f955b
commit 20bc9108d3
146 changed files with 24465 additions and 0 deletions

43
backprop/neurone.cpp Normal file
View File

@@ -0,0 +1,43 @@
#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;
}