Function

NumCosmoMathutil_function_params

Declaration [src]

gchar*
ncm_util_function_params (
  const gchar* func,
  gdouble** x,
  guint* len
)

Description [src]

Parses the function name and its numerical parameters from func. Aborts if a parameter is not a number.

Parameters

func

Type: const gchar*

A string “name” or “name(x1, x2, …)”.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
x

Type: An array of double

The parameters.

The argument will be set by the function.
The length of the array is specified in the len argument.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.
len

Type: guint*

Number of parameters.

The argument will be set by the function.

Return value

Type: gchar*

The function name, or NULL if func does not have that form.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.