|
| typedef unsigned int | uint |
| |
| typedef double | flt |
| | The basic floating point type used in the simulations. More...
|
| |
| typedef std::complex< flt > | cmplx |
| |
| typedef Eigen::Matrix< flt, NDIM, 1 > | Vec |
| | The basic physics vector. More...
|
| |
| typedef Eigen::Matrix< flt, 2, 1 > | Vec2 |
| |
| typedef Eigen::Matrix< flt, 3, 1 > | Vec3 |
| |
| typedef Eigen::Matrix< flt, NDIM, NDIM > | Matrix |
| |
| typedef Eigen::Matrix< flt, 2, 2 > | Matrix2 |
| |
| typedef Eigen::Matrix< flt, 3, 3 > | Matrix3 |
| |
| typedef Eigen::Matrix< flt, NDIM, 2 > | VecPair |
| |
| typedef boost::mt19937 | engine |
| |
| typedef boost::normal_distribution< flt > | normdistribution |
| |
| typedef boost::uniform_01< flt, flt > | lindistribution |
| |
| typedef boost::variate_generator< engine &, normdistribution > | normgenerator |
| |
| typedef boost::variate_generator< engine &, lindistribution > | lingenerator |
| |
|
| Vec | vec () |
| | A one-liner for creating a Vec object, occasionally useful from within Python. More...
|
| |
| Vec2 | vec (double x, double y) |
| |
| Vec3 | vec (double x, double y, double z) |
| |
| Vec3 | cross (Vec3 v1, Vec3 v2) |
| |
| flt | cross (Vec2 v1, Vec2 v2) |
| |
| Vec2 | cross (Vec2 v, flt n) |
| |
| Vec2 | perp (Vec2 v) |
| |
| Vec | perpto (Vec r, Vec to) |
| |
| Vec2 | rotate (Vec2 v, uint i) |
| |
| Vec2 | rotate_inv (Vec2 v, uint i) |
| |
| Vec2 | flip (Vec2 v) |
| |
| Vec2 | rotate_flip (Vec2 v, uint i) |
| |
| Vec2 | rotate_flip_inv (Vec2 v, uint i) |
| |
| Vec3 | rotate (Vec3 v, uint i) |
| |
| Vec3 | rotate_inv (Vec3 v, uint i) |
| |
| Vec3 | flip (Vec3 v) |
| |
| Vec3 | rotate_flip (Vec3 v, uint i) |
| |
| Vec3 | rotate_flip_inv (Vec3 v, uint i) |
| |
| uint | vecsize () |
| |
| flt | rand01 () |
| | Generate a random number between 0 and 1, using the "global" random number generator. More...
|
| |
| Vec | rand_vec () |
| | Generate a random vector from a Gaussian distribution, i.e. More...
|
| |
| Vec | rand_vec_boxed () |
| | Generate a random vector inside a box with sides of length 1. More...
|
| |
| Vec | rand_vec_sphere (flt radius=1) |
| | Generate a random vector inside a sphere. More...
|
| |
| unsigned int | seed (unsigned int n) |
| | Seed the global random number generator with a given integer. More...
|
| |
| unsigned int | seed () |
| | Seed the global random number generator with the current time. More...
|
| |
| long double | to_LD (double e) |
| | Go to and from Long Doubles. More...
|
| |
| double | from_LD (long double e) |
| | Go to and from Long Doubles. More...
|
| |
| vector< long double > | LDVector (vector< double > dists) |
| | Go to and from Long Doubles. More...
|
| |
| template<typename Derived > |
| bool | hasNaN (const Eigen::DenseBase< Derived > &m) |
| | Is there a NaN in this matrix? Eigen has an allFinite and hasNan function as of version 3.2, but Ubuntu libeigen3-dev is not up that far. More...
|
| |
| template<typename Derived > |
| bool | allFinite (const Eigen::DenseBase< Derived > &m) |
| | Are all values finite, i.e. More...
|
| |
| template<typename Derived > |
| void | finite_or_throw (const Eigen::DenseBase< Derived > &m) |
| |
| Matrix | best_rotation_matrix (Eigen::Matrix< flt, Eigen::Dynamic, NDIM > &from, Eigen::Matrix< flt, Eigen::Dynamic, NDIM > &to) |
| |
Generate a random vector from a Gaussian distribution, i.e.
\ \(P(x)=\frac{1}{\sqrt{2 \pi}} e^{\frac{-x^2}{2\pi}}\), and similarly for \(y\) and \(z\).
In terms of spherical coordinates, directionality is uniform on a sphere, and the radial distribution is a Chi Distribution with \(\sigma=1\).