Namespace

NumCosmoMath – 1.0

NumCosmo Math Library

Version0.27.0
AuthorsNumCosmo Developers
LicenseLGPL-2.1-or-later
Websitehttps://numcosmo.github.io/
Sourcehttps://github.com/NumCosmo/NumCosmo

Build

C headersnumcosmo/numcosmo-math.h
pkg-config filesnumcosmo

Dependencies

GObject—2.0 The base type system library
Browse documentation
NumCosmo NumCosmo Library
Browse documentation

Additional documentation

Classes

Bootstrap

Generic index bootstrap.

C

Numerical and physical constants.

CSQ1D

Abstract class for one-dimensional harmonic-oscillator evolution using the complex-structure formalism.

Data

Abstract class for implementing data objects.

DataDist1d

This object is an abstract class for one variable distribution data.

DataDist2d

This object is designate to data that is described by a bivariate and arbitrary distribution.

DataFunnel

Funnel distribution.

DataGauss

Gaussian data — inverse covariance provided.

DataGaussCov

Gaussian data — covariance provided.

DataGaussCovMVND

Multivariate Normal Distribution — covariance provided.

DataGaussDiag

Gaussian data — diagonal covariance provided.

DataGaussMix2D

Gaussian Mixture 2d distribution.

DataPoisson

Abstract class for implementing poisson distributed data.

DataRosenbrock

Rosenbrock distribution.

Dataset

A set of NcmData objects.

Diff

Numerical differentiation object.

Fftlog

Abstract class for implementing logarithm fast fourier transform.

FftlogGausswin2

Logarithm fast fourier transform for a kernel given by the square of a Gaussian window function.

FftlogSBesselJ

Logarithm fast fourier transform for a kernel given by the spatial correlation function multipoles.

FftlogSBesselJLJM

Logarithm fast fourier transform for the base kernel for angular projections.

FftlogTophatwin2

Logarithm fast fourier transform for a kernel given by the square of the spherical Bessel function of order one.

Fit

Abstract class for implementing fitting methods.

FitESMCMC

Ensemble sampler Markov Chain Monte Carlo analysis.

FitESMCMCWalker

Ensemble sampler Markov Chain Monte Carlo walker class.

FitESMCMCWalkerAPES

Ensemble sampler Markov Chain Monte Carlo walker - apes move.

FitESMCMCWalkerStretch

Ensemble sampler Markov Chain Monte Carlo walker - stretch move.

FitESMCMCWalkerWalk

Ensemble sampler Markov Chain Monte Carlo walker - walk move.

FitGSLLS

Best-fit finder — GSL least squares algorithms.

FitGSLMM

Best-fit finder — GSL non-linear minimization algorithms.

FitGSLMMS

Best-fit finder — GSL non-linear minimization (simplex) algorithms.

FitLevmar

Best-fit finder — Levenberg-Marquardt nonlinear least squares algorithm library.

FitMC

Monte Carlo analysis.

FitMCBS

Monte Carlo and bootstrap analysis.

FitMCMC

Markov Chain Monte Carlo analysis.

FitNLOpt

Interface for NLopt optmization library.

FitState

State of a NcmFit object.

FunctionCache

A generic cache for functions values.

FunctionSampleSet

Ordered sample set for vector-valued functions $\vec{F}: \mathbb{R} \to \mathbb{R}^n$.

Integral1d

One dimensional integration object.

Integral1dPtr

Function pointer one dimensional integration object.

IntegralND

N-dimensional integration object.

ISet

Index set object.

LHRatio1d

Likelihood ratio for one dimensional parameter analysis.

LHRatio2d

Likelihood ratio object for bidimensional parameter analysis.

Likelihood

Likelihood combining a NcmDataset and priors.

Matrix

Matrix object representing an array of doubles.

Model

Abstract class for implementing models.

ModelBuilder

A NcmModel builder.

ModelCtrl

Control object for testing updates on model status.

ModelFunnel

Multivariate Normal Distribution mean model.

ModelMVND

Multivariate Normal Distribution mean model.

ModelRosenbrock

Multivariate Normal Distribution mean model.

MPIJob

Abstract class to implement MPI jobs.

MPIJobFEval

MPI job object for evaluating fit steps.

MPIJobFit

MPI job object for running NcmFit.

MPIJobMCMC

MPI job object for running MCMC steps.

MPIJobTest

Test implementation of MPI job class.

MSet

A set of different NcmModel objects.

MSetCatalog

Ordered catalog of different NcmMSet parameter values.

MSetFunc

Abstract class for arbitrary MSet functions.

MSetFunc1

Abstract class for arbitrary MSet functions - bindable version.

MSetFuncList

NcmMSet Functions list.

MSetTransKern

Abstract Class for a transition kernel and prior.

MSetTransKernCat

Catalog sampler.

MSetTransKernFlat

Multivariate flat sampler.

MSetTransKernGauss

A multivariate gaussian sampler.

NNLS

Non-negative linear least-squares.

OdeSpline

Automatic generation of splines from ODE solvers.

PLN1D

A Poisson–Lognormal 1D integrator using mode finding (GSL Lambert-W), shifted Gauss–Hermite, or Laplace fallback.

Powspec

Abstrac class for power spectrum implementation.

PowspecCorr3d

Class to compute the 3d spatial correlation function from the power spectrum.

PowspecFilter

Class to compute filtered power spectrum.

PowspecSphereProj

Class to compute spherical projection of power spectra.

PowspecSpline2d

Power spectrum implementation using a 2D spline.

Prior

Base class for prior distributions.

PriorFlat

Base class for flat prior distributions.

PriorFlatFunc

Flat prior on a derived quantity.

PriorFlatParam

Flat prior on a sampling parameter.

PriorGauss

A gaussian prior for NcmLikelihood.

PriorGaussFunc

Gaussian prior on a parameter.

PriorGaussParam

Gaussian prior on a parameter.

Reparam

Abstract class for model reparametrization.

ReparamLinear

Linear reparametrization object.

RNG

Encapsulated GNU Scientific Library (GSL) random number generator with support for multhreading.

SBesselIntegrator

Base class for spherical Bessel function integrators.

SBesselIntegratorFFTL

FFT-Legendre based spherical Bessel function integrator.

SBesselIntegratorGL

Gauss-Legendre based spherical Bessel function integrator.

SBesselIntegratorLevin

Levin-Bessel method for spherical Bessel function integration.

SBesselOdeSolver

Spectral ODE solver for the spherical Bessel equation in polynomial form using ultraspherical methods.

Serialize

Serialization, deserialization and duplication object.

SFSBesselArray

Spherical Bessel function array evaluator with automatic cutoff.

SFSphericalHarmonics

Spherical Harmonics object.

SParam

Properties of a scalar parameter.

Spectral

SphereMap

An re-implementation of Healpix.

SphereNN

An re-implementation of Healpix.

Spline

Base class for implementing splines.

Spline2d

Base class for implementing bidimensional splines.

Spline2dBicubic

Bidimensional bicubic spline.

Spline2dGsl

Implements spline from spline method using The GNU Scientific Library (GSL) as base splines.

Spline2dSpline

Implements bidimensional splines from splines method.

SplineCubic

Base class for implementing cubic splines.

SplineCubicD2

Cubic spline implementation given second derivatives.

SplineCubicNotaknot

Cubic spline implementation with ‘not a knot’ boundary conditions.

SplineFuncTest

Test suite to analyze the NcmSplineFunc’s knots distribution.

SplineGsl

GSL spline object wrapper.

SplineRBF

Radial Basis Function implementation of spline class.

SplineVec

A vector-valued spline function $\vec{F}(x): \mathbb{R} \to \mathbb{R}^n$.

StatsDist

Base class for implementing N-dimensional probability distributions.

StatsDist1d

Base class for implementing one dimensional probability distributions.

StatsDist1dEPDF

One dimensional probability distribution based on an EPDF.

StatsDist1dSpline

One dimensional probability distribution based on a spline.

StatsDist2d

Base class for implementing two-dimensional probability distributions.

StatsDist2dSpline

Two-dimensional probability distribution based on a spline.

StatsDistKDE

Base class for implementing N-dimensional probability distributions with a fixed density estimator kernel.

StatsDistKernel

An N-dimensional kernel used to compute the kernel density estimation function (KDE) in the NcmStatsDist class.

StatsDistKernelGauss

An N-dimensional Gaussian kernel used to compute the kernel density estimation function (KDE) in the NcmStatsDist class.

StatsDistKernelST

An N-dimensional Student’s t kernel used to compute the kernel density estimation function (KDE) in the NcmStatsDist class.

StatsDistVKDE

Base class for implementing N-dimensional probability distributions with a variable density estimator kernel.

StatsVec

An online statistics vector.

Timer

A timer with ETA support.

Vector

Vector object representing arrays of doubles.

VParam

Properties of a vector-like parameter.

Structs

BinSplit

Binnary splitting algorithms used to evaluate sums fast and with arbitrary precision.

Complex

CSQ1DState

Represents the state of the system.

DTuple2

A 2-dimensional tuple of double precision floating point numbers.

DTuple3

A 3-dimensional tuple of double precision floating point numbers.

FitGrad

Container for gradient functions.

FunctionSampleSetIter

Iterator for traversing samples in a NcmFunctionSampleSet. Provides O(1) access to sample data once positioned, making it efficient for sequential traversal and interval operations.

IntegralFixed

Fixed-point numerical integration structure. Contains integration bounds and nodes for fixed Gauss-Legendre or other quadrature schemes.

Integrand2dim

Two-dimensional integrand structure. Holds a function pointer and user data for 2D numerical integration routines.

Integrand3dim

Three-dimensional integrand structure. Holds a function pointer and user data for 3D numerical integration routines.

LapackWS

LHRatio2dPoint

Boxed object containing a point in the 2d parameter space.

LHRatio2dRegion

Object describing a confidence region.

MemoryPool

Generic memory pool.

MemoryPoolSlice

MPIJobCtrl

MpsfSBesselRecur

Multi-precision spherical Bessel function recursion structure. This structure holds the state for computing spherical Bessel functions using high-precision MPFR arithmetic with recursion relations.

MSetFuncListStruct

Structure defining a function in the model set function list. This holds metadata for functions that can be evaluated on model parameter sets.

MSetModelDesc

MSetPIndex

ObjArray

GObjects array with serialization support.

ObjDictInt

GObjects dictionary with integer keys.

ObjDictStr

GObjects dictionary with string keys.

Quaternion

Quaternions algebra, three-vectors and mapping to matrix.

RNGDiscrete

SBesselOdeOperator

Opaque boxed type for a configured spectral operator.

SFSphericalHarmonicsK

Recurrence coefficients.

SFSphericalHarmonicsP

Boxed P values.

SFSphericalHarmonicsY

Recurrence boxed object.

SFSphericalHarmonicsYArray

Recurrence array boxed object.

Spline2dBicubicCoeffs

Structure to hold the coefficients of a bicubic spline.

TriVec

VarDict

Variable dictionary.

Enumerations

CSQ1DEvolState

Variables describing the system evolution state. The state NCM_CSQ1D_EVOL_STATE_ADIABATIC is used to describe the adiabatic evolution of the system, this state use the frame

NCM_CSQ1D_FRAME_ADIAB1 with the variables $(\alpha,\, \delta\gamma)$ to compute the evolution.

The state NCM_CSQ1D_EVOL_STATE_UP and NCM_CSQ1D_EVOL_STATE_UM are used to describe the non-adiabatic evolution of the system, these states use the frame #NCM_CSQ1D_FRAME_ORIG with the variables $(\chi,\, U_+)$ and $(\chi,\, U_-)$ to compute the evolution, respectively.

CSQ1DFrame

Frames for the system.

CSQ1DInitialStateType

Initial conditions for the system. The initial condition NCM_CSQ1D_INITIAL_CONDITION_TYPE_AD_HOC is used to set an arbitrary initial condition. The initial conditions NCM_CSQ1D_INITIAL_CONDITION_TYPE_ADIABATIC2, NCM_CSQ1D_INITIAL_CONDITION_TYPE_ADIABATIC4 and NCM_CSQ1D_INITIAL_CONDITION_TYPE_NONADIABATIC2 are used to set the initial conditions for the adiabatic and non-adiabatic vacuum initial conditions.

DataPoissonType

Types of Poisson-distributed data. These specify the data format for Poisson likelihood calculations.

DatasetBStrapType

Bootstrap types.

FitESMCMCWalkerAPESKType

Kernel used to build the approximate posterior.

FitESMCMCWalkerAPESMethod

Posterior estimation method.

FitGradType

Defines the type of gradient calculation.

FitGSLMMAlgos

GSL Multidimensional minimization algorithms.

FitGSLMMSAlgos

GSL Multidimensional minimization algorithms without derivatives.

FitLevmarAlgos

Levmar algorithms.

FitMCResampleType

Montecarlo resample options.

FitNloptAlgorithm

FitNloptResult

FitRunMsgs

Defines the type of messages to be printed during the fit.

FitType

Defines the subclasse of NcmFit to be used.

FunctionCacheSearchType

Cache search direction.

IntegralNDError

The type of the error estimation used to perform the integral.

IntegralNDMethod

The type of the method used to perform the integral.

LHRatio1dRoot

Root finding methods used by NcmLHRatio1d.

LHRatio2dRoot

Root finding methods used by NcmLHRatio2d.

MatrixInternal

This enumerator is only used internally. Only by developers.

ModelFunnelSParams

Funnel model parameters.

ModelFunnelVParams

Funnel model parameters.

ModelMVNDVParams

MVND model parameters.

ModelRosenbrockSParams

Rosenbrock model parameters.

MPIJobCtrlMsg

Control messages from master to slave. All messages have the same size, specifying tag #NCM_MPI_CTRL_TAG_CMD.

MPIJobCtrlTag

MPI tags for master-slave communication. If NCM_MPI_CTRL_TAG_CMD is used, the message is a control message.

NCM_MPI_CTRL_SLAVE_INIT must be followed by #NCM_MPI_CTRL_TAG_JOB containing the serialized job.

NCM_MPI_CTRL_SLAVE_WORK must be followed by #NCM_MPI_CTRL_TAG_WORK_INPUT containing the serialized input.

NCM_MPI_CTRL_SLAVE_WORK is followed by #NCM_MPI_CTRL_TAG_WORK_RETURN containing the serialized return.

NCM_MPI_CTRL_SLAVE_FREE does not need to be followed by any message. The slave can be reinitialized with #NCM_MPI_CTRL_SLAVE_INIT.

NCM_MPI_CTRL_SLAVE_KILL should not be followed by any message. The slave will exit.

MSetCatalogPostNormMethod

See ncm_mset_catalog_calc_max_ess_time() and ncm_mset_catalog_calc_heidel_diag().

MSetCatalogSync

Catalog sync modes.

MSetCatalogTauMethod

Method used to estimate the autocorrelation time $\tau$.

MSetTransKernCatSampling

Sampling methods.

NNLSUMethod

Method used to solve the intermediate unconstrained least-squares.

ParamType

NcmParamType indicates if the parameter must be fitted, NCM_PARAM_TYPE_FREE, or if it remains fixed, NCM_PARAM_TYPE_FIXED, when a statistical analysis is carried out.

PowspecFilterType

Filter type to apply to the power spectrum. See also NcmFftlogTophatwin2 and NcmFftlogGausswin2, for the top-hat and Gaussian filters, respectively.

SphereMapCoordSys

Sphere map coordinate system.

SphereMapOrder

Sphere map pixel ordering.

SplineFuncTestType

Enum to choose which base function to be used in the test suite.

SplineFuncTestTypePDF

Enum to choose which PDF type.

SplineFuncType

Enumeration to choose which of the functions to be applied when interpolating the input #gsl_function *F, $f$, with the desired rel_error in the range [xi, xf]. The interpolation knots, $\mathbf{x}$, are automatically defined internally by the functions. For more details see [description][numcosmo-NcmSplineFunc.description] above.

SplineGslType

Enumeration to choose which GSL interpolation method as backend to be used by the object. It can be used with the function ncm_spline_gsl_new_by_id() when a new NcmSplineGsl is created.

SplineRBFType

Enumeration to choose which Gaussian RBF interpolation method to be applied by the object.

StatsDist1dEPDFBw

Gaussian kernel bandwidth type.

StatsDistCV

Cross-validation method to be applied.

StatsDistKDECovType

Selects the covariance type to use in the kernel interpolation.

StatsVecARType

Autoregressive model selection criteria. These criteria are used to automatically select the optimal order for autoregressive models in time series analysis.

StatsVecType

Statistical types for vector statistics computation. These determine which statistical quantities are computed and stored during data accumulation.

VectorInternal

This enumerator is only used internally. Only by developers.

Bitfields

MSetCatalogTrimType

See ncm_mset_catalog_calc_max_ess_time() and ncm_mset_catalog_calc_heidel_diag().

SerializeOpt

Options for serialization.

Error Domains

CfgError

Error codes for the ncm_cfg namespace.

ModelError

Error codes returned by the NcmModel class.

MSetError

Error codes returned by the NcmMSet class.

Callbacks

_FitLSFJ

_FitLSJ

_FitM2lnLGrad

_FitM2lnLValGrad

_Integrand2dimFunc

_Integrand3dimFunc

BinSplitEval

CfgLoggerFunc

DataFisherMatrix

Calculates the Fisher-information matrix I.

DataGaussCovMVNDBound

DiffFunc1to1

Functon $f(x)$ call back.

DiffFunc1toM

Functon $f(x)$ call back.

DiffFuncNto1

Functon $f(x)$ call back.

DiffFuncNtoM

Functon $f(x)$ call back.

FftlogFunc

FitMCResample

FitUpdateChange

FitUpdater

FitWriter

FuncEvalLoop

FunctionSampleSetFunc

Vector-valued function type $\vec{F}: \mathbb{R} \to \mathbb{R}^n$. The function should evaluate at x and write the result into y.

Integral1dF

Integral1dPtrF

IntegralNDF

The type of the function that must be implemented by a subclass of NcmIntegralND.

IntegralNDGetDimensions

The type of the function that must be implemented by a subclass of NcmIntegralND.

IntegralPeakfinder

MemoryPoolAlloc

ModelAddSubmodel

ModelFunc0

ModelFunc1

ModelFunc2

ModelVFunc0

ModelVFunc1

ModelVFunc2

MSetFunc1N

MSetFuncListN

MSetFuncN

OdeSplineDydx

PriorFlatMean

PriorGaussMean

ReparamV

Function type for reparameterization. See also NcmReparam.

SBesselIntegratorF

Function to be integrated with spherical Bessel functions. Computes K(x, k) for the integral ∫K(x,k)*j_ℓ(kx)dx.

SBesselOdeSolverF

Callback function type for the right-hand side forcing term $f(x)$ in the modified spherical Bessel ODE. The function is evaluated at physical coordinates $x \in [a,b]$ and should return $f(x)$ corresponding to the inhomogeneous term.

SpectralF

Function to be used in spectral computations. The function is defined over an interval [a, b] and receives x in that interval. Internally, Chebyshev polynomials work with the transformed variable $t \in [-1, 1]$ where $t = (2x - (a + b))/(b - a)$ and $x = ((b - a)t + (a + b))/2$.

SplineFuncF

SplineFuncTestPrepare

StatsVecUpdateFunc

VectorCompFunc

Functions

binsplit_alloc

Allocates a new NcmBinSplit.

binsplit_eval_join

Evaluates the sum of nt terms and joins the result to the sum stored in bs.

binsplit_eval_prec

Evaluates the sum until the number of bits of precision is greater or equal to prec.

binsplit_get

Computes the value of the sum stored in bs and stores the result in res in the form of a #mpfr_t.

binsplit_get_d

Computes the value of the sum stored in bs and stores the result in res in the form of a double.

binsplit_get_q

Computes the value of the sum stored in bs and stores the result in q. The result is stored in the form of a #mpq_t.

binsplit_join

Joins two NcmBinSplit objects, it is assumed that bs_l and bs_r are consecutive in the sum.

binsplit_test_next

Computes the number of bits of precision that would be gained by adding nt terms to the sum.

cfg_array_set_variant

Transfers the data from var to a.

cfg_array_to_variant

Creates a variant of array type from a.

cfg_command_line

Converts argv to a single string.

cfg_enable_gsl_err_handler

Enables the GSL error handler.

cfg_entries_to_keyfile

Transforms the entries into a keyfile kfile group group_name.

cfg_enum_get_value

Gets the enum value from enum_type by n.

cfg_enum_print_all

Prints all enum values from enum_type.

cfg_exists

Checks if filename exists in the numcosmo path.

cfg_get_commit_hash

Gets the commit hash of the library.

cfg_get_data_directory

Gets the data directory path. It first checks the environment variable NCM_CFG_DATA_DIR_ENV, then the package data directory and finally the package source directory. If none of these directories exists, it raises an error.

cfg_get_data_filename

Looks for filename in the data path and returns the full path if found.

cfg_get_enum_by_id_name_nick

Gets the enum value from enum_type by id_name_nick.

cfg_get_fftw_default_flag

Gets the default FFTW flag.

cfg_get_fftw_default_flag_str

Gets the default FFTW flag as a string.

cfg_get_fftw_timelimit

Gets the planner time out in seconds. A negative value means no time out.

cfg_get_fullpath

Gets the full path of filename.

cfg_get_fullpath_base

Gets the full path base directory.

cfg_get_version

Gets the version of the library.

cfg_get_version_string

Gets the version of the library as a string.

cfg_init

Main library configuration function. Must be called before any other function of NumCosmo.

cfg_init_full

Main library configuration function. Must be called before any other function of NumCosmo.

cfg_init_full_ptr

Main library configuration function. Must be called before any other function of NumCosmo.

cfg_keyfile_to_arg

Transforms the entries in a keyfile kfile group group_name into an array of strings representing the command line arguments.

cfg_load_fftw_wisdom

Loads the FFTW wisdom from filename.

cfg_lock_plan_fftw

Locks the FFTW plan. This is a generic lock for all FFTW plans.

cfg_logfile

Enables or disables the log file.

cfg_logfile_flush

Enables or disables the log file flush.

cfg_logfile_flush_now

Flushes the log file.

cfg_mpi_nslaves

cfg_msg_sepa

Log a message separator.

cfg_register_functions

Register functions for the ncm_cfg namespace.

cfg_register_obj

Registers the object obj in the GObject type system.

cfg_register_objects

Registers the objects of the library.

cfg_save_fftw_wisdom

Saves the current FFTW wisdom to filename.

cfg_set_blis_nthreads

Sets BLIS number of threads to n when available.

cfg_set_error_log_handler

Sets all log information to stream.

cfg_set_fftw_default_flag

Sets the default FFTW flag (FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE) to be used when building plans. The variable timeout sets the maximum time spent on planners.

cfg_set_fftw_default_flag_str

Sets the default FFTW flag (FFTW_ESTIMATE, FFTW_MEASURE, FFTW_PATIENT, FFTW_EXHAUSTIVE) to be used when building plans. The variable timeout sets the maximum time spent on planners. The argument flag_str is a string representation of the flag:.

cfg_set_fftw_default_from_env

Sets the default FFTW flag and planner time out from the environment variables NCM_FFTW_PLANNER and NCM_FFTW_PLANNER_TIMELIMIT. If the environment variables are not set, it uses the fallback_flag and fallback_timeout.

cfg_set_fftw_default_from_env_str

Sets the default FFTW flag and planner time out from the environment variables NCM_FFTW_PLANNER and NCM_FFTW_PLANNER_TIMELIMIT. If the environment variables are not set, it uses the fallback_flag_str and fallback_timeout.

cfg_set_log_handler

Sets all log information to stream.

cfg_set_logfile

Sets all log information to filename.

cfg_set_logstream

Sets all log information to stream.

cfg_set_mkl_nthreads

Sets OpenBLAS number of threads to n when available.

cfg_set_openblas_nthreads

Sets OpenBLAS number of threads to n when available.

cfg_set_openmp_nthreads

Sets OpenMP number of threads to n when available.

cfg_string_to_comment

Transforms str into a comment string.

cfg_unlock_plan_fftw

Unlocks the FFTW plan. This is a generic lock for all FFTW plans.

cfg_version_check

Checks if the library version is greater or equal to major, minor and micro.

cmp

Compare x and y and return -1 if x < y, 0 if x == y and 1 if x > y, all comparisons are done with precision reltol and abstol.

cmpdbl

Compares x and y and returns the difference between them relative to their mean.

d1exprel

Computes the first derivative of the relative exponential $(\exp(x) - 1)/x$.

d2exprel

Computes the second derivative of the relative exponential $(\exp(x) - 1)/x$.

d3exprel

Computes the third derivative of the relative exponential $(\exp(x) - 1)/x$.

exprel

Computes the relative exponential $(\exp(x) - 1)/x$.

func_eval_log_pool_stats

func_eval_set_max_threads

Set the new maximun number of threads to be used by the pool. Note that this function is global changing this will affect every place which uses these functions.

func_eval_threaded_loop

Using the thread pool, evaluate fl in each value of (f-i)/nthreads.

func_eval_threaded_loop_full

Using the thread pool, evaluate fl sending one worker per index.

func_eval_threaded_loop_nw

Using the thread pool, evaluate fl in each value of (f-i)/nwork.

integral_cached_0_x

This function searches for the nearest x_near value previously chosen as the upper integration limit and perform the integration at [x_near, x] interval. This result is summed to that obtained at [0, x_near] and then it is saved in the cache.

integral_cached_x_inf

This function searchs for the nearest x_near value previously chosed as the lower integration limit and perform the integration at $[x, x_{near}]$ interval. This result is summed to that obtained at $[x_{near}, \infty]$ and then it is saved in the cache.

integral_get_workspace

This function provides a workspace to be used by numerical integration functions of GSL. It keeps a internal pool of workspaces and allocate a new one if the function is called and the pool is empty. It is designed to be used in a multi-thread environment. The workspace must be unlocked in order to return to the pool. This must be done using the #ncm_memory_pool_return.

integral_locked_a_b

This function uses a workspace from the pool and gsl_integration_qag function to perform the numerical integration in the [a, b] interval.

integral_locked_a_inf

This function uses a workspace from the pool and gsl_integration_qagiu function to perform the numerical integration in the $[a, \infty]$ interval.

integrate_2dim

This function computes the integral of the function integ->f over the interval [xi, xf] and [yi, yf] using the Cuhre algorithm from the Cuba library.

integrate_2dim_divonne

This function computes the integral of the function integ->f over the interval [xi, xf] and [yi, yf] using the Divonne algorithm from the Cuba library.

integrate_2dim_divonne_peakfinder

This function computes the integral of the function integ->f over the interval [xi, xf] and [yi, yf] using the Divonne algorithm from the Cuba library. It uses a peakfinder to find the peaks of the integrand and improve the integration of concentrated functions.

integrate_2dim_vegas

This function computes the integral of the function integ->f over the interval [xi, xf] and [yi, yf] using the Vegas algorithm from the Cuba library.

integrate_3dim

This function computes the integral of the function integ->f over the interval [xi, xf] and [yi, yf] and [zi, zf] using the Cuhre algorithm from the Cuba library.

integrate_3dim_divonne

This function computes the integral of the function integ->f over the interval [xi, xf] and [yi, yf] and [zi, zf] using the Divonne algorithm from the Cuba library.

integrate_3dim_vegas

This function computes the integral of the function integ->f over the interval [xi, xf] and [yi, yf] and [zi, zf] using the Vegas algorithm from the Cuba library.

lapack_dgeev

This function computes the eigensystem for a real matrix a = A.

lapack_dgeevx

This function computes the eigensystem for a real matrix a = A.

lapack_dgelqf

DGELQF computes a LQ factorization of a real M-by-N matrix A: A = L * Q.

lapack_dgels

DGELS solves overdetermined or underdetermined real linear systems involving an M-by-N matrix A, or its transpose, using a QR or LQ factorization of A. It is assumed that A has full rank.

lapack_dgelsd

DGELSD computes the minimum-norm solution to a real linear least squares problem: minimize 2-norm(| b - A*x |) using the singular value decomposition (SVD) of A. A is an M-by-N matrix which may be rank-deficient.

lapack_dgeqlf

DGEQLF computes a QL factorization of a real M-by-N matrix A: A = Q * L.

lapack_dgeqrf

DGEQRF computes a QR factorization of a real M-by-N matrix A: A = Q * R.

lapack_dgerqf

DGERQF computes a RQ factorization of a real M-by-N matrix A: A = R * Q.

lapack_dgesv

This function computes the solution of $A X = B$ for a general n by n matrix a = A using the LU factorization with partial pivoting and row interchanges. On entry b contain the vectors $B$ and on exit b contain the solutions if the return is 0. The array ipiv records the pivot indices from the factorization.

lapack_dggglm_alloc

Calculates and allocs memory to solve the system determined by the parameters.

lapack_dggglm_run

Runs the dggglm function using the workspace ws.

lapack_dposv

This function computes the solution of $A X = B$ for a real symmetric positive definite matrix a = A using the Cholesky factorization $A = U^TU$ or $A = LL^T$. On entry b contain the vectors $B$ and on exit b contain the solutions if the return is 0.

lapack_dpotrf

This function computes the Cholesky factorization of a real symmetric positive definite matrix a.

lapack_dpotri

This function computes the inverse of a real symmetric positive definite matrix a = A using the Cholesky factorization $A = U^TU$ or $A = LL^T$ computed by ncm_lapack_dpotrf().

lapack_dpotrs

This function computes the solution of $A X = B$ for a real symmetric positive definite matrix a = A using the Cholesky factorization $A = U^TU$ or $A = LL^T$ already performed by ncm_lapack_dpotrf(). On entry b contain the vectors $B$ and on exit b contain the solutions if the return is 0.

lapack_dptsv

This function computes the solution to a real system of linear equations $A*X = B$ (B = b), where $A$ is an N-by-N (N = n) symmetric positive definite tridiagonal matrix, and $X$ and $B$ are N-by-NRHS (NRHS = 1) matrices.

lapack_dsyevd

Computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix a.

lapack_dsyevr

Computes selected eigenvalues and, optionally, eigenvectors of a real symmetric matrix a.

lapack_dsysv

Purpose #.

lapack_dsysvx

Purpose #.

lapack_dsysvxx

Purpose #.

lapack_dsytrf

This function computes the factorization of a real symmetric matrix a, using the Bunch-Kaufman diagonal pivoting method.

lapack_dsytri

This function compute the inverse of a real symmetric indefinite matrix a using the factorization a = UDUT or a = LDLT computed by ncm_lapack_dsytrf().

lapack_dsytrs

This function computes the solution of $A X = B$ for a real symmetric positive definite matrix a = A using the Cholesky factorization $A = U^TU$ or $A = LL^T$ already performed by ncm_lapack_dpotrf(). On entry b contain the vectors $B$ and on exit b contain the solutions if the return is 0.

message

Logs a message.

message_str

Logs a message string.

message_ww

Logs a word wrapped message.

mpsf_0F1_d

Computes the Hypergeometric function ${}_0F_1(b;x)$.

mpsf_0F1_free_cache

Frees all buffers created to compute ncm_mpsf_0F1.

mpsf_0F1_q

Computes the Hypergeometric function ${}_0F_1(b;x)$.

mpsf_sbessel

Computes the Spherical Bessel function $j_\ell(x)$.

mpsf_sbessel_d

Computes the Spherical Bessel function $j_\ell(x)$.

mpsf_sbessel_free_cache

Frees all buffers created to compute ncm_mpsf_sbessel functions.

mpsf_sin_int_mpfr

Computes the sine integral $$\mathrm{Si}(x) = \int_0^x \frac{\sin x’}{x’}\mathrm{d}x.$$.

mpz_clears

Clears z and all the #mpz_t in the list.

mpz_inits

Initializes z and all the #mpz_t in the list.

rational_coarse_double

Computes a rational approximation for x and stores the result in q.

sf_0F1

Computes the Hypergeometric function ${}_0F_1(b;x)$.

sf_sbessel

Computes Spherical Bessel function $j_\ell(x)$.

sf_sbessel_spline

Computes a spline approximation of the Spherical Bessel $j_\ell$ in the interval $[x_i, x_f]$.

sf_sbessel_taylor

Computes Spherical Bessel function power series coefficients up to order three, i.e., $$\left(j_\ell(x),\; j’\ell(x), \frac{j”\ell(x)}{2!}, \frac{j”’_\ell(x)}{3!}\right).$$.

sf_sin_int

Computes the sine integral $$\mathrm{Si}(x) = \int_0^x \frac{\sin x’}{x’}\mathrm{d}x.$$.

spline2dim_integ_total

string_ww

Creates a word wrapped string.

util_1mcosx

Calculates $1 - \cos(x)$ using the appropriated taylor series when $\cos(x) \approx 1$.

util_1msinx

Calculates $1 - \sin(x)$ using the appropriated taylor series when $\sin(x) \approx 1$.

util_1pcosx

Calculates $1 + \cos(x)$ using the appropriated taylor series when $\cos(x) \approx -1$.

util_1psinx

Calculates $1 + \sin(x)$ using the appropriated taylor series when $\sin(x) \approx -1$.

util_basename_fits

Extracts the extension .fits or .fit from fits_filename and returns the prefix. If the extension is not found a copy of fits_filename is returned.

util_cos2x

Calculates $\cos(2x)$ using the appropriated taylor series when $\sin(x) \approx 1$.

util_cvode_check_flag

Checks the CVode flag value and prints a message if an error occured.

util_cvode_print_stats

Prints the statistics of the CVodeMem object cvode.

util_fact_size

Calculate the smallest factorization of n such that $n_f = 2^\mu \times 3^\nu \times 5^\alpha \times 7^\beta$ and $n_f \geq n$.

util_forward_or_call_error

Forwards the error from local_error, adding a prefix message formatted with format and its arguments, if local_error is not NULL. If local_error is NULL, the function does nothing. If error is not NULL, the function forwards local_error to error. If error is NULL, the function calls g_error with local_error.

util_function_params

Extracts the function name and its numerical parameters.

util_gaussian_integral

Computes the integral of the Gaussian distribution with mean mu and standard deviation sigma between xl and xu.

util_great_circle_distance

Compute the great circle distance (or separation, as defined in astropy) between poistion 1 (ra1, dec1) and position 2 (ra2, dec2). See Great-circle distance, in particular the Vincenty equation (implemented here). The input coordinates ((ra1, dec1), (ra2, dec2)) must be given in decimal degrees.

util_ln1pexpx

Calculates $\ln[1+\exp(x)]$.

util_log_gaussian_integral

Computes the logarithm of the integral of the Gaussian distribution with mean mu and standard deviation sigma between xl and xu. Uses the standard normal log integral. If sign is not NULL, the sign of the result (+/-1) is stored in *sign.

util_log_normal_gaussian_integral

Computes the logarithm of the integral of the Gaussian distribution with zero mean and unit variance between xl and xu. If sign is not NULL, the sign of the result (+/-1) is stored in *sign.

util_mln_1mIexpzA_1pIexpmzA

Computes $$z_1 = z - \ln\left(\frac{1-i e^{+z} A}{1+i e^{-z} A}\right),$$ where $z = \rho + i\theta$ and return the new $z_1 = \rho_1 + i\theta_1$ into rho1 and $\theta1$.

util_normal_gaussian_integral

Computes the integral of the Gaussian distribution with zero mean and unit variance between xl and xu.

util_position_angle

Computes the on-sky position angle (East of North) between object1 (ra1, dec1) and object2 (ra2, dec2). The input coordinates ((ra1, dec1), (ra2, dec2)) must be given in decimal degrees.

util_projected_radius

Converts the the angular separation $\theta$' of a galaxy at redshift$z$’ to the projected physical distance in Mpc.

util_set_or_call_error

If error is not NULL, it sets the error message, otherwise it calls g_error. The error message is formatted using format and the arguments.

util_sinh1

Computes $\frac{\sinh(x)}{x}$. For small values of x the taylor series is used. For large values of x the value is computed using the standard library function.

util_sinh3

util_sinhx_m_xcoshx_x3

util_sleep_ms

Suspend the thread execution for milliseconds.

util_smooth_trans

util_smooth_trans_get_theta

util_sqrt1px_m1

Calculates $\sqrt{1+x}-1$ using the appropriated expression to avoid round-off when $x \approx 0$.

Function Macros

acb_get_complex

assert_cmpdouble

assert_cmpdouble_e

BINSPLIT_DECL

BINSPLIT_DENC_NULL

CHECK_PREPARED

COMPLEX_INIT

COMPLEX_INIT_REAL

COMPLEX_PTR

CVODE_CHECK

DTUPLE2_STATIC_INIT

Initializes a NcmDTuple2 with the given elements.

DTUPLE3_STATIC_INIT

Initializes a NcmDTuple3 with the given elements.

FITS_ERROR

g_string_clear

GARRAY_DUP

GARRAY_MEMCPY

INTEGRAL_ND_DEFINE_TYPE

A convenience macro to define a subclass of NcmIntegralND with a custom user data type.

INTEGRAL_ND_DEFINE_TYPE_WITH_FREE

A convenience macro to define a subclass of NcmIntegralND with a custom user data type and a custom method to free the user data.

LAPACK_CHECK_INFO

MODEL_2OPT2IMPL

MODEL_3OPT2IMPL

MODEL_4OPT2IMPL

MODEL_FUNC0_IMPL

MODEL_FUNC1_IMPL

MODEL_FUNC2_IMPL

MODEL_OPT2IMPL

MODEL_SET_IMPL_FUNC

MODEL_VFUNC0_IMPL

MODEL_VFUNC1_IMPL

MODEL_VFUNC2_IMPL

MPI_JOB_DEBUG_PRINT

MSET_MID

MSET_MODEL_DECLARE_ID

Declares a function to get the model id from the model namespace. This macro should be used in the header file of the model.

MSET_MODEL_ID_FUNC

Defines a function to get the model id from the model namespace.

MSET_MODEL_REGISTER_ID

Defines the function to get the model id from the model namespace. This macro should be used in the source file of the model.

N2VECTOR

SF_SPHERICAL_HARMONICS_ARRAY_INDEX

SPHERE_MAP_ALM_INDEX

SPHERE_MAP_ALM_SIZE

SPHERE_MAP_INT_TO_XY

SPHERE_MAP_M_START

SPHERE_MAP_N

SPHERE_MAP_XY_TO_INT

STATS_VEC_HEIDEL_PVAL_COR

TEST_FAIL

TEST_FREE

TEST_GSL_RESULT

TEST_PASS

UNUSED

UTIL_CALLBACK_ARGS

UTIL_DECLARE_CALLBACK

This macro declares a callback structure and the functions to handle it. You must use NCM_UTIL_CALLBACK_ARGS to declare the arguments of the callback function. The argument arg_decl can be empty.

UTIL_DEFINE_CALLBACK

This macro defines the functions to handle the callback structure. You must use NCM_UTIL_CALLBACK_ARGS to declare both the arguments declaration of the callback function and the arguments of the function. They can be empty.

util_exp10

UTIL_ON_ERROR_FORWARD

UTIL_ON_ERROR_RETURN

Constants

BOOTSTRAP_RNG_NAME

CFG_DATA_DIR_ENV

COMPLEX_ZERO

DATA_RESAMPLE_RNG_NAME

DEFAULT_PRECISION

DTUPLE2_TYPE

GVariant type string for NcmDTuple2.

DTUPLE3_TYPE

GVariant type string for NcmDTuple3.

FIT_DEFAULT_M2LNL_ABSTOL

FIT_DEFAULT_M2LNL_RELTOL

FIT_DEFAULT_MAXITER

FIT_DEFAULT_PARAMS_RELTOL

FIT_ESMCMC_M2LNL_ID

FIT_ESMCMC_MIN_SYNC_INTERVAL

FIT_ESMCMC_MPI_IN_LEN

FIT_ESMCMC_MPI_OUT_LEN

FIT_MC_MIN_SYNC_INTERVAL

FIT_MCMC_MIN_SYNC_INTERVAL

INTEGRAL1D_DEFAULT_ABSTOL

INTEGRAL1D_DEFAULT_ALG

INTEGRAL1D_DEFAULT_PARTITION

INTEGRAL1D_DEFAULT_RELTOL

INTEGRAL_ABS_ERROR

INTEGRAL_ALG

INTEGRAL_ERROR

INTEGRAL_ND_DEFAULT_ABSTOL

INTEGRAL_ND_DEFAULT_RELTOL

INTEGRAL_PARTITION

MODEL_CLASS_IMPL_ALL

MODEL_MAX_STATES

MPI_CTRL_MASTER_ID

MSET_CATALOG_ASYMB_LABEL

MSET_CATALOG_DIST_EST_SD_SCALE

MSET_CATALOG_EXTNAME

MSET_CATALOG_FIRST_ID_LABEL

MSET_CATALOG_FSYMB_LABEL

MSET_CATALOG_M2LNL_COLNAME

MSET_CATALOG_M2LNL_SYMBOL

MSET_CATALOG_M2LNP_ID_LABEL

MSET_CATALOG_NADDVAL_LABEL

MSET_CATALOG_NCHAINS_LABEL

MSET_CATALOG_NROWS_LABEL

MSET_CATALOG_RNG_ALGO_LABEL

MSET_CATALOG_RNG_INIS_LABEL

MSET_CATALOG_RNG_SEED_LABEL

MSET_CATALOG_RNG_STAT_LABEL

MSET_CATALOG_RTYPE_BSTRAP_MEAN

MSET_CATALOG_RTYPE_LABEL

MSET_CATALOG_RTYPE_UNDEFINED

MSET_CATALOG_WEIGHTED_LABEL

MSET_INIT_MARRAY

MSET_MAX_STACKSIZE

MSET_MODEL_MAIN

Id of a main model. Used to identify the main model in hierarchy of models.

ODE_SPLINE_DEFAULT_ABSTOL

ODE_SPLINE_MIN_STEP

POWSPEC_CORR3D_DEFAULT_SIZE

POWSPEC_FILTER_DEFAULT_SIZE

POWSPEC_SPHERE_PROJ_DEFAULT_SIZE

SBESSEL_INTEGRATOR_LEVIN_DEFAULT_CHEB_MIN_ORDER

SBESSEL_INTEGRATOR_LEVIN_DEFAULT_CHEB_RELTOL

SBESSEL_INTEGRATOR_LEVIN_DEFAULT_ELL_CACHE_MAX

SBESSEL_INTEGRATOR_LEVIN_DEFAULT_N_KNOTS

SBESSEL_INTEGRATOR_LEVIN_DEFAULT_RELTOL

SBESSEL_INTEGRATOR_LEVIN_DEFAULT_Y_KNOTS_MAX

SBESSEL_INTEGRATOR_LEVIN_DEFAULT_Y_KNOTS_MIN

SERIALIZE_AUTOSAVE_NAME

SERIALIZE_AUTOSAVE_NFORMAT

SERIALIZE_MATRIX_TYPE

SERIALIZE_OBJECT_ARRAY_OBJ_NAME_STR

SERIALIZE_OBJECT_ARRAY_POS_STR

SERIALIZE_OBJECT_ARRAY_TYPE

SERIALIZE_OBJECT_DICT_INT_TYPE

SERIALIZE_OBJECT_DICT_STR_TYPE

SERIALIZE_OBJECT_FORMAT

SERIALIZE_OBJECT_TYPE

SERIALIZE_PROPERTIES_TYPE

SERIALIZE_PROPERTY_TYPE

SERIALIZE_STRV_TYPE

SERIALIZE_VAR_DICT_TYPE

SERIALIZE_VECTOR_TYPE

SF_SPHERICAL_HARMONICS_ARRAY_DEFAULT_ABSTOL

SF_SPHERICAL_HARMONICS_DEFAULT_ABSTOL

SF_SPHERICAL_HARMONICS_EPS

SF_SPHERICAL_HARMONICS_LATERAL_MOVE

SF_SPHERICAL_HARMONICS_MAX_LEN

SPHERE_MAP_DEFAULT_SIGNAL

SPHERE_MAP_HEALPIX_NULLVAL

SPLINE2D_BICUBIC_00

SPLINE2D_BICUBIC_01

SPLINE2D_BICUBIC_10

SPLINE2D_BICUBIC_11

SPLINE2D_BICUBIC_F

SPLINE2D_BICUBIC_FX

SPLINE2D_BICUBIC_FXY

SPLINE2D_BICUBIC_FY

SPLINE_FUNC_DEFAULT_MAX_NODES

SPLINE_KNOT_DIFF_TOL

THREAD_POOL_MAX

TIMER_SEC_FORMAT

ZERO_LIMIT