summaryrefslogtreecommitdiff
path: root/2015-spacebot/src/brain/neural_link.cpp
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:24:15 +0200
committerJustin Wernick <justin@worthe-it.co.za>2022-04-19 21:24:15 +0200
commit8eebf1079fbed2848ee47cf990f5def5926a0c1f (patch)
treeb51a6cc24fb900c717bf479d357a9ae8a98e07ef /2015-spacebot/src/brain/neural_link.cpp
parent550caeee11086bd56db69176b3149ddfa160ee30 (diff)
Refile for merging repos
Diffstat (limited to '2015-spacebot/src/brain/neural_link.cpp')
-rw-r--r--2015-spacebot/src/brain/neural_link.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/2015-spacebot/src/brain/neural_link.cpp b/2015-spacebot/src/brain/neural_link.cpp
new file mode 100644
index 0000000..6997bd6
--- /dev/null
+++ b/2015-spacebot/src/brain/neural_link.cpp
@@ -0,0 +1,11 @@
+#include "brain/neural_link.h"
+
+NeuralLink::NeuralLink(NeuralNode* input, double weight)
+ :_input(input), _weight(weight)
+{
+}
+
+double NeuralLink::weightedActivation() const
+{
+ return _input->activation()*_weight;
+}