Spike
Loading...
Searching...
No Matches
SusceptibilitySimulationLinNonlin.h
Go to the documentation of this file.
1
5#ifndef SPIKE_SUSCEPTIBILITYSIMULATIONLINNONLIN_H
6#define SPIKE_SUSCEPTIBILITYSIMULATIONLINNONLIN_H
7
9
10namespace Spike {
11
18 private:
19 std::vector<std::complex<double>> suscept_lin;
20 std::vector<std::complex<double>>
21 suscept_nonlin_diag;
22 std::vector<std::complex<double>>
23 suscept_nonlin_antidiag;
24
25 public:
30 explicit SusceptibilitySimulationLinNonlin(const std::string &input_file);
31
40 void calculate(size_t trials) override;
41
46 void add_to_suscepts(const std::vector<std::complex<double>> &tmp_lin,
47 const std::vector<std::complex<double>> &tmp_nonlin_diag,
48 const std::vector<std::complex<double>> &tmp_nonlin_antidiag);
49
54 [[nodiscard]] size_t get_size_lin() const { return suscept_lin.size(); };
55
60 [[nodiscard]] size_t get_size_nonlin() const { return suscept_nonlin_diag.size(); };
61
66 [[nodiscard]] const std::vector<std::complex<double>> &get_suscept_lin()
67 const {
68 return suscept_lin;
69 };
70
75 [[nodiscard]] const std::vector<std::complex<double>> &get_suscept_nonlin_diag()
76 const {
77 return suscept_nonlin_diag;
78 };
79
84 [[nodiscard]] const std::vector<std::complex<double>> &get_suscept_nonlin_antidiag()
85 const {
86 return suscept_nonlin_antidiag;
87 };
88};
89
90} // namespace Spike
91
92#endif // SPIKE_SUSCEPTIBILITYSIMULATIONLINNONLIN_H
A simulation where we measure the linear (first order) susceptibility as well as the diagonal and ant...
Definition SusceptibilitySimulationLinNonlin.h:17
const std::vector< std::complex< double > > & get_suscept_nonlin_diag() const
Returns the diagonal nonlinear susceptibility vector.
Definition SusceptibilitySimulationLinNonlin.h:75
const std::vector< std::complex< double > > & get_suscept_nonlin_antidiag() const
Returns the antidiagonal nonlinear susceptibility vector.
Definition SusceptibilitySimulationLinNonlin.h:84
size_t get_size_nonlin() const
Returns the size of the nonlinear susceptibility vector.
Definition SusceptibilitySimulationLinNonlin.h:60
void calculate(size_t trials) override
Calculates the linear susceptibility and the diagonal and antidiagonal second order susceptibility fo...
Definition SusceptibilitySimulationLinNonlin.cpp:14
SusceptibilitySimulationLinNonlin(const std::string &input_file)
Constructs susceptibility simulation from .ini file.
Definition SusceptibilitySimulationLinNonlin.cpp:7
void add_to_suscepts(const std::vector< std::complex< double > > &tmp_lin, const std::vector< std::complex< double > > &tmp_nonlin_diag, const std::vector< std::complex< double > > &tmp_nonlin_antidiag)
Adds the susceptibility tmp_lin to suscept_lin.
Definition SusceptibilitySimulationLinNonlin.cpp:29
const std::vector< std::complex< double > > & get_suscept_lin() const
Returns the linear susceptibility vector.
Definition SusceptibilitySimulationLinNonlin.h:66
size_t get_size_lin() const
Returns the size of the linear susceptibility vector.
Definition SusceptibilitySimulationLinNonlin.h:54
Implements a prototype simulation during which we measure the susceptibility of an integrate-and-fire...
Definition SusceptibilitySimulation.h:19