Cypress  1.0
C++ Spiking Neural Network Simulation Framework
tuning_curve.hpp
Go to the documentation of this file.
1 /*
2  * Cypress -- C++ Spiking Neural Network Simulation Framework
3  * Copyright (C) 2016 Andreas Stöckel
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
27 #ifndef CYPRESS_NEF_TUNING_CURVE_HPP
28 #define CYPRESS_NEF_TUNING_CURVE_HPP
29 
30 #include <vector>
31 
32 #include <cypress/core/types.hpp>
34 
35 namespace cypress {
36 namespace nef {
37 
39 private:
41 
42  size_t m_n_samples;
43  size_t m_n_repeat;
44 
46 
47  Real m_t_wnd;
48 
49  std::vector<Real> m_test_values;
50  std::vector<Real> m_test_spike_train;
51 
52 public:
53  static constexpr size_t DEFAULT_N_SAMPLES = 100;
54  static constexpr size_t DEFAULT_N_REPEAT = 10;
55 
57  size_t n_samples = DEFAULT_N_SAMPLES,
58  size_t n_repeat = DEFAULT_N_REPEAT,
59  Real min_spike_interval = DeltaSigma::DEFAULT_MIN_SPIKE_INTERVAL,
62 
63  const std::vector<Real> &input_spike_train() const
64  {
65  return m_test_spike_train;
66  }
67 
68  std::vector<std::pair<Real, Real>> evaluate_output_spike_train(
69  std::vector<Real> output_spikes);
70 
72  {
73  return m_t_wnd * m_test_values.size() * 1e3;
74  }
75 };
76 }
77 }
78 
79 #endif /* CYPRESS_NEF_TUNING_CURVE_HPP */
80 
Definition: tuning_curve.hpp:38
static constexpr Real DEFAULT_STEP
Definition: delta_sigma.hpp:47
static constexpr Real DEFAULT_MIN_SPIKE_INTERVAL
Definition: delta_sigma.hpp:49
static constexpr size_t DEFAULT_N_REPEAT
Definition: tuning_curve.hpp:54
Definition: delta_sigma.hpp:57
Real input_spike_train_len() const
Definition: tuning_curve.hpp:71
double Real
Definition: types.hpp:56
const std::vector< Real > & input_spike_train() const
Definition: tuning_curve.hpp:63
std::vector< std::pair< Real, Real > > evaluate_output_spike_train(std::vector< Real > output_spikes)
Definition: brainscales_lib.hpp:39
TuningCurveEvaluator(size_t n_samples=DEFAULT_N_SAMPLES, size_t n_repeat=DEFAULT_N_REPEAT, Real min_spike_interval=DeltaSigma::DEFAULT_MIN_SPIKE_INTERVAL, Real response_time=DeltaSigma::DEFAULT_RESPONSE_TIME, Real step=DeltaSigma::DEFAULT_STEP)
Definition: delta_sigma.hpp:107
static constexpr Real DEFAULT_RESPONSE_TIME
Definition: delta_sigma.hpp:46
static constexpr size_t DEFAULT_N_SAMPLES
Definition: tuning_curve.hpp:53