aboutsummaryrefslogtreecommitdiff
path: root/MemCell.hpp
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 03:15:03 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 03:15:30 +0100
commit6fd23da97fa9700f59c61a966b4bf7d25fa46b34 (patch)
treed5fe3a8305a5f57e5b4cedc8300e951c74696cc5 /MemCell.hpp
initial commitHEADmaster
Diffstat (limited to 'MemCell.hpp')
-rw-r--r--MemCell.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/MemCell.hpp b/MemCell.hpp
new file mode 100644
index 0000000..4b1a38f
--- /dev/null
+++ b/MemCell.hpp
@@ -0,0 +1,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__