Method

NumCosmoMathDiffrc_d1_1_to_M

Declaration [src]

GArray*
ncm_diff_rc_d1_1_to_M (
  NcmDiff* diff,
  const gdouble x,
  const guint dim,
  NcmDiffFunc1toM f,
  gpointer user_data,
  GArray** Eerr
)

Description [src]

Calculates the first derivative of f: $\partial_i f$ using the central method plus Richardson extrapolation. The function $f$ is considered as a $f:\mathbb{R}^N \to \mathbb{R}$, where $N = $ length of x_a.

Parameters

x

Type: const gdouble

Function argument.

dim

Type: const guint

Dimension of f.

f

Type: NcmDiffFunc1toM

Function to differentiate.

user_data

Type: gpointer

Function user data.

The argument can be NULL.
The data is owned by the caller of the method.
Eerr

Type: An array of double

Estimated errors.

The argument will be set by the function.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.

Return value

Type: An array of double

The derivative of f at x_a.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.