Struct

NumCosmoXcorKernelIntegrand

Description [src]

struct NcXcorKernelIntegrand {
  guint len;
  NcXcorKernelIntegrandEval eval_func;
  NcXcorKernelIntegrandGetRange get_range_func;
  gpointer data;
  GDestroyNotify data_free;
}

A reference-counted closure for computing kernel integrands. The eval_func function should fill len values in the W array for the given wavenumber k.

Structure members
len: guint

Number of components in the integrand.

eval_func: NcXcorKernelIntegrandEval

Function to evaluate the integrand at k, filling W[len].

get_range_func: NcXcorKernelIntegrandGetRange

Function to get the valid k range for this integrand.

data: gpointer

User data passed to eval_func and get_range_func.

data_free: GDestroyNotify

Function to free data, or NULL if no cleanup needed.

Constructors

nc_xcor_kernel_integrand_new

Creates a new NcXcorKernelIntegrand with reference count of 1.

Functions

nc_xcor_kernel_integrand_clear

If *integrand is not NULL, decreases its reference count and sets the pointer to NULL.

Instance methods

nc_xcor_kernel_integrand_eval

Evaluates the integrand at wavenumber k, storing len results in W.

nc_xcor_kernel_integrand_eval_array

Evaluates the integrand at wavenumber k and returns the results in a newly allocated GArray. This is a convenience wrapper around nc_xcor_kernel_integrand_eval() that handles array allocation.

nc_xcor_kernel_integrand_get_len

Gets the number of components in the integrand.

nc_xcor_kernel_integrand_get_range

Gets the valid k range for this integrand.

nc_xcor_kernel_integrand_ref

Increases the reference count of integrand by one atomically.

nc_xcor_kernel_integrand_unref

Decreases the reference count of integrand by one atomically. When the reference count reaches zero, frees integrand and its associated data using the free function provided at creation time (if any).