Connection.h 1.16 KB
Newer Older
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
 * DESCRIPTION OF THE FILE
 *
 * @author Michal Kravčenko
 * @date 13.6.18 -
 */

#ifndef INC_4NEURO_CONNECTION_H
#define INC_4NEURO_CONNECTION_H

#include "../Neuron/Neuron.h"
class Neuron;

/**
 *
 */
class Connection {
private:
    /**
     *
     */
    Neuron *neuron_in = nullptr;

    /**
     *
     */
    Neuron *neuron_out = nullptr;

    /**
     *
     */
    double weight = 0.0;

    //TODO pridat gradient

public:

    /**
     *
     * @param[in] n_in
     * @param[in] n_out
     * @param[in] edge_weight
     */
    Connection(Neuron *n_in, Neuron *n_out, double edge_weight = 1.0);

//    Connection(Neuron *n_in, Neuron *n_out, Connection* ref_con);

    /**
     *
     */
    ~Connection()=default;

    /**
     *
     * @param[in] value
     */
    void adjust_weight(double value);

    /**
     *
     * @param[in] value
     */
    void set_weight(double value);

    /**
     *
     * @return
     */
    double get_weight();


    /**
     *
     */
    void pass_signal();


    /**
     *
     * @return
     */
    Neuron* get_neuron_in();

    /**
     *
     * @return
     */
    Neuron* get_neuron_out();

};


#endif //INC_4NEURO_CONNECTION_H