+/GENN
genetically evolving neural networks
git clone https://git.julia.blue/+/GENN
9e6fe89
v0.2
1#ifndef GENN_COMPONENTS_H 2#define GENN_COMPONENTS_H 3 4#include <vector> 5 6class Connection ; 7 8class Neuron { 9public : 10Neuron (int a ,int t = 2 ) { 11id = a ; 12type = t ;//0 input, 1 output, 2 hidden 13 } 14 15double value = 0 ,sum = 0 ; 16int id ,type ; 17std ::vector < Connection *> inputs ; 18}; 19 20class Connection { 21public : 22Connection (){} 23Connection (Neuron * a ,Neuron * b ,double w ,bool e = true) { 24input = a ; 25output = b ; 26weight = w ; 27enabled = e ; 28 } 29 30bool enabled ; 31Neuron * input ; 32Neuron * output ; 33double weight ; 34}; 35 36#endif //GENN_COMPONENTS_H