aboutsummaryrefslogtreecommitdiff
path: root/MemCell.hpp
blob: 4b1a38fe9c5b98d7ee8e7b58f593df0ffb25e9cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef __MEMCELL_HPP__
#define __MEMCELL_HPP__

#include "Neuron.hpp"

class MemCell : public Node
{
public:
    MemCell(unsigned inputCount, bool zeroed = false);

    void setChromosome(const Chromosome &chromosome);
    Chromosome getChromosome() const;
    unsigned getChromosomeSize() const;

    float io(const std::vector<float> &inputs);

private:
    Neuron m_input;
    Neuron m_inputGate;
    Neuron m_memGate;
    Neuron m_outputGate;

    float m_context = 0.f;
};

#endif // __MEMCELL_HPP__