summaryrefslogtreecommitdiff
path: root/core/list_synapses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/list_synapses.cpp')
-rw-r--r--core/list_synapses.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/core/list_synapses.cpp b/core/list_synapses.cpp
new file mode 100644
index 0000000..6132b56
--- /dev/null
+++ b/core/list_synapses.cpp
@@ -0,0 +1,22 @@
+#include <iostream>
+
+#include "everything_else.hpp"
+#include "id_list.hpp"
+#include "topology.hpp"
+
+int main(int argc, char **argv) {
+ assert(argc == 3);
+ assertSimDir();
+ {
+ Topology t;
+ IdList<Ptr<Neuron>::ptr_t> src(argv[1]), dst(argv[2]);
+
+ for (auto i : src) {
+ int j=0;
+ Ptr<Synapse> s(-1);
+ while ((s = t.synapse(Ptr<Neuron>(i), j++)) != t.nil())
+ if (dst.count(s.extractNeuron()()))
+ std::cout << s() << "\t" << i << " -> " << s.extractNeuron() << "\n";
+ }
+ }
+}
contact: Jan Huwald // Impressum