blob: 8ff44c2c74e9ce035c7151b6f566374a48abeb54 (
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
27
28
29
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<float> io(const std::vector<float> &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<std::unique_ptr<Node>> m_nodes;
};
#endif // __NODELAYER_HPP__
|