#ifndef CELL_HPP #define CELL_HPP 1 // This is the header file for the cell class. // David R. Morrison #include #include #include #include #include "util.hpp" using namespace std; class Cell { private: // Vectors for training int inputVectorSize; vector inputs; vector weights; vector inGateDerivs; vector forgetGateDerivs; vector cellDerivs; // Cell state double input; double cec; double output; public: // Constructor Cell(int input_vector_size); // Evaluate the cells output, given inputs and gate values double evaluateSample(vector inputs, double inputGate, double forgetGate, double outputGate); void clear(); // Training void calcDerivs(double inputGate, double forgetGate); void changeWeight(unsigned int i, double delta); // Getters double getCECValue(); double getInGateDeriv(unsigned int i); double getForgetGateDeriv(unsigned int i); double getCellDeriv(unsigned int i); double getWeight(unsigned int i); ostream& print(ostream& out); }; ostream& operator<<(ostream& out, Cell c); #endif // CELL_HPP