aboutsummaryrefslogtreecommitdiff
path: root/Neuron.hpp
blob: f2f72695998de26c37f965f84229a41a7ea28677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef __NEURON_HPP__
#define __NEURON_HPP__

#include "Node.hpp"

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

    void setChromosome(const Chromosome &chromosome);
    Chromosome getChromosome() const;
    unsigned getChromosomeSize() const { return m_inputCount + 1; }

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

private:
    std::vector<float> m_weights;
    float m_bias = 0.f;
};

#endif // __NEURON_HPP__