Langevin C++ source

Loading...
Searching...
No Matches
langevin_types.hpp
Go to the documentation of this file.
1
5
6#ifndef CORE_HPP
7#define CORE_HPP
8
9#include <iostream>
10#include <vector>
11#include <random>
12#include <pybind11/numpy.h>
13#include <valarray>
14
16 typedef std::mt19937 rng_t;
17
19 typedef std::vector<double> dbl_vec_t;
21 typedef std::vector<int> int_vec_t;
22
24 typedef std::vector<double> grid_t;
25// typedef std::valarray<double> grid_t; // doesn't work
26
28 typedef std::vector<int> neighborhood_t;
30 typedef std::vector< neighborhood_t > grid_wiring_t;
31// typedef std::valarray<int> grid_connection_t; // doesn't work
32// typedef std::valarray< grid_connection_t > grid_wiring_t; // doesn't work
33
35 typedef std::poisson_distribution<int> poisson_dist_t;
37 typedef std::gamma_distribution<double> gamma_dist_t;
39 typedef std::normal_distribution<double> gaussian_dist_t;
41 typedef std::uniform_real_distribution<double> uniform_dist_t;
42
43#include "langevin_enums.hpp"
45 typedef std::vector<GridTopology> gt_vec_t;
46 typedef std::vector<BoundaryCondition> bc_vec_t;
47
48 namespace py = pybind11;
50 typedef py::array_t<double, py::array::c_style> py_array_t;
51
52#endif
langevin_enums.hpp
Enumerated parameter options for BaseLangevin integrator.
gamma_dist_t
std::gamma_distribution< double > gamma_dist_t
Type for function generating gamma variates.
Definition langevin_types.hpp:37
grid_t
std::vector< double > grid_t
Type for density grid.
Definition langevin_types.hpp:24
poisson_dist_t
std::poisson_distribution< int > poisson_dist_t
Type for function generating Poisson variates.
Definition langevin_types.hpp:35
neighborhood_t
std::vector< int > neighborhood_t
Type for density grid wiring.
Definition langevin_types.hpp:28
py_array_t
py::array_t< double, py::array::c_style > py_array_t
Type for Python arrays of doubles.
Definition langevin_types.hpp:50
gt_vec_t
std::vector< GridTopology > gt_vec_t
Type for specifying grid topology in each direction x, y, z...
Definition langevin_types.hpp:45
grid_wiring_t
std::vector< neighborhood_t > grid_wiring_t
Type for grid-cell neighborhood connections.
Definition langevin_types.hpp:30
uniform_dist_t
std::uniform_real_distribution< double > uniform_dist_t
Type for function generating uniformly distributed variates.
Definition langevin_types.hpp:41
gaussian_dist_t
std::normal_distribution< double > gaussian_dist_t
Type for function generating Gaussian variates.
Definition langevin_types.hpp:39
int_vec_t
std::vector< int > int_vec_t
Type for vectors of integers.
Definition langevin_types.hpp:21
dbl_vec_t
std::vector< double > dbl_vec_t
Type for vectors of doubles.
Definition langevin_types.hpp:19
rng_t
std::mt19937 rng_t
Use Mersenne Twister random number generator.
Definition langevin_types.hpp:16