![]() |
AlmaBTE
1.3
A solver of the space- and time-dependent Boltzmann transport equation for phonons
|
Base class for discrete distributions over a q-point grid. More...
#include <sampling.hpp>

Public Member Functions | |
| Grid_distribution (const Gamma_grid &grid, randutils::mt19937_rng &_rng) | |
| Constructor. More... | |
| virtual | ~Grid_distribution () |
| Trivial virtual destructor. | |
| void | fill_cumulative (const std::vector< double > &p) |
| Fill the 'cumulative' vector. More... | |
| std::array< std::size_t, 2 > | sample () |
| Draw a sample from the distribution. More... | |
Public Attributes | |
| const std::size_t | nqpoints |
| Number of q points. | |
| const std::size_t | nmodes |
| Number of phonon modes at each q point. | |
Base class for discrete distributions over a q-point grid.
|
inline |
Constructor.
| [in] | grid | - phonon spectrum on a regular grid |
| [in] | _rng | - a random number generator |
| void alma::Grid_distribution::fill_cumulative | ( | const std::vector< double > & | p | ) |
Fill the 'cumulative' vector.
| [in] | p | - vector with the unnormalized probabilities of each q point |
|
inline |
Draw a sample from the distribution.