From 6fd23da97fa9700f59c61a966b4bf7d25fa46b34 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 03:15:03 +0100 Subject: initial commit --- NodeLayer.hpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 NodeLayer.hpp (limited to 'NodeLayer.hpp') diff --git a/NodeLayer.hpp b/NodeLayer.hpp new file mode 100644 index 0000000..8ff44c2 --- /dev/null +++ b/NodeLayer.hpp @@ -0,0 +1,30 @@ +#ifndef __NODELAYER_HPP__ +#define __NODELAYER_HPP__ + +#include "Neuron.hpp" +#include "MemCell.hpp" + +class NodeLayer +{ +public: + NodeLayer(unsigned inputCount, unsigned nodeCount, NodeClass nodeClass, bool zeroed = false); + + void setChromosome(const Chromosome &chromosome); + Chromosome getChromosome() const; + unsigned getChromosomeSize() const; + + std::vector io(const std::vector &inputs); + + unsigned getInputCount() const { return m_inputCount; } + unsigned getNodeCount() const { return m_nodeCount; } + NodeClass getNodeClass() const { return m_nodeClass; } + +private: + unsigned m_inputCount = 0; + unsigned m_nodeCount = 0; + NodeClass m_nodeClass; + + std::vector> m_nodes; +}; + +#endif // __NODELAYER_HPP__ -- cgit v1.2.1