layer.h #ifndef __SHAREWIZ_LAYER_H__ #define __SHAREWIZ_LAYER_H__ #include #include //#include "neuron.h" // Layer class. // // A Neural Network can have multiple Layers. class Layer; class Neuron; typedef std::shared_ptr pLayerX; typedef std::vector pLayer; typedef std::shared_ptr pNeuronX; typedef std::vector pNeuron; class Layer { private: int index; double global_bias = 0.0; // From the NET. A global bias value to add to every layer. pNeuron neurons; public: Layer(); Layer(unsigned int num_neurons); unsigned int getSize(void); // Returns how many neurons. int getIndex(void); void setIndex(const int& index); double getGlobalBias(void); void setGlobalBias(const double& _global_bias); void addNeuron(const pNeuronX& n); void removeNeuron(const int& idx); pNeuronX& getNeuron(const int& idx); void feedForward(const pLayerX& prevLayer); void printOutput(void); }; #endif