diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2015-08-02 20:45:24 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2015-08-02 20:45:24 +0200 |
commit | 1049b6acb37c244ef7470b2e7fe4145a616d3df3 (patch) | |
tree | dbb5d8d0eb670cbd10d645dc4b8fa24ac70e192e /include | |
parent | 87ef7e90829053b7bc336f7316c3facb6c51e781 (diff) |
Changed network innards to use maps
Diffstat (limited to 'include')
-rw-r--r-- | include/brain/neural_network.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/brain/neural_network.h b/include/brain/neural_network.h index ccd65eb..22e5e42 100644 --- a/include/brain/neural_network.h +++ b/include/brain/neural_network.h @@ -3,6 +3,7 @@ #include <memory> #include <istream> #include <vector> +#include <map> #include <string> #include "brain/neural_node.h" @@ -23,10 +24,10 @@ public: int numberOfOutputs() const { return _outputs.size(); } private: - std::vector<std::shared_ptr<Sensor>> _sensors; + std::map<int, std::shared_ptr<Sensor>> _sensors; std::shared_ptr<BiasNode> _biasNode; - std::vector<std::shared_ptr<Neuron>> _hiddenNodes; - std::vector<std::shared_ptr<Neuron>> _outputs; + std::map<int, std::shared_ptr<Neuron>> _hiddenNodes; + std::map<int, std::shared_ptr<Neuron>> _outputs; void parseFile(std::istream &&file); |