layer.h

#ifndef __SHAREWIZ_LAYER_H__
#define __SHAREWIZ_LAYER_H__
 
#include <memory>
#include <vector>
 
//#include "neuron.h"
 
// Layer class.
//
// A Neural Network can have multiple Layers.
 
class Layer;
class Neuron;
 
 
typedef std::shared_ptr<Layer> pLayerX;
typedef std::vector<pLayerX> pLayer;
 
typedef std::shared_ptr<Neuron> pNeuronX;
typedef std::vector<pNeuronX> 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