-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathAxon.h
55 lines (45 loc) · 1.51 KB
/
Axon.h
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
#ifndef AXON_H
#define AXON_H
#include "Synapse.h"
#include "Reservoir.h"
#include "utils.h"
#include "global.h"
#include <vector>
class Synapse;
class Neuron;
class Reservoir;
class Axon
{
public:
/** Default constructor */
Axon();
Axon(int x, int y, int z, Neuron* origin);
Axon(int x, int y, int z, Neuron* origin, Reservoir* res);
void setDirection();
void growDirection();
void forceLink(Neuron* target);
void createSynapses(); // This should create the new Synapse objects in the array and connect them only to Neurons in the positive xyz region (within the Reservoir).
void retractSynapses(); // This will iterate through the linked list and remove Synapses below threshold.
void removeSynapse(Synapse* target);
void insertSynapse(Synapse* target);
void passSignal(float value);
Synapse* getSynapseHead ();
int getNumSynapses();
void printPosition();
/** Default destructor */
virtual ~Axon();
protected:
private:
int maxAxonLength;
int maxSynapses;
int position[3];
float direction[3];
Synapse* head;
Synapse* tail;
//Synapse* synapse[MAX_SYNAPSES]; // There can not be any empty synapse elements between non-empty elements. If this is unavoidable or really slow, find another way to do this and tell me.
int numSynapses;
int length;
Neuron* origin;
Reservoir* res;
};
#endif // AXON_H