Triumvirate C++ API 0.5.0
Three-point clustering measurements in large-scale structure analyses.
Loading...
Searching...
No Matches
maths.hpp File Reference

Mathematical calculations. More...

#include <gsl/gsl_interp.h>
#include <gsl/gsl_sf_bessel.h>
#include <gsl/gsl_sf_coupling.h>
#include <gsl/gsl_sf_gamma.h>
#include <gsl/gsl_sf_legendre.h>
#include <gsl/gsl_sf_result.h>
#include <gsl/gsl_spline.h>
#include <cmath>
#include <complex>
#include <vector>
#include "monitor.hpp"
+ Include dependency graph for maths.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  trv::maths::SphericalHarmonicCalculator
 Reduced spherical harmonics. More...
 
class  trv::maths::SphericalBesselCalculator
 Interpolated spherical Bessel function \( j_\ell(x) \) of the first kind. More...
 

Namespaces

namespace  trv
 
namespace  trv::maths
 

Functions

std::complex< double > trv::maths::eval_complex_in_polar (double r, double theta)
 Evaluate a complex number \( r e^{i \theta} \) in the polar form.
 
double trv::maths::get_vec3d_magnitude (std::vector< double > vec)
 Return the magnitude of a 3-d vector.
 
double trv::maths::get_vec3d_magnitude (double *vec)
 Return the magnitude of a 3-d vector.
 
std::complex< double > trv::maths::eval_lanczos_approx_series (std::complex< double > z)
 Evaluate the Lanczos approximation series \( A_g(z) \) for the gamma function.
 
std::complex< double > trv::maths::eval_gamma_lanczos (std::complex< double > z)
 Evaluate the gamma function \( \Gamma(z) \) on the complex plane using the Lanczos approximation.
 
void trv::maths::get_lngamma_parts (double x, double y, double &lnr, double &theta)
 Get the real and imaginary parts of the log-gamma function \( \ln\Gamma(z = x + \mathrm{i}\,y) \).
 
std::complex< double > trv::maths::eval_gamma_lnratio (double mu, std::complex< double > nu)
 Evaluate the logarithm of the ratio of two gamma functions.
 
double trv::maths::wigner_3j (int j1, int j2, int j3, int m1, int m2, int m3)
 Calculate Wigner 3-j symbol.
 

Variables

const std::complex< double > trv::maths::M_I
 imaginary unit
 
const double trv::maths::eps_coupling = 1.e-9
 zero-tolerance for Wigner 3-j coupling coefficients
 

Detailed Description

Mathematical calculations.

Authors
Mike S Wang (https://github.com/MikeSWang), Naonori S Sugiyama (https://github.com/naonori)

Mathematical calculations provided include:

  • spherical Bessel functions of the first kind with interpolation;
  • (reduced) spherical harmonics include 3-d mesh grid storage;
  • Wigner 3-j symbols;
  • the gamma function and related quantities with Lanzcos approximation.

Definition in file maths.hpp.