Constructor

NumCosmoMathVectornew_full

Declaration [src]

NcmVector*
ncm_vector_new_full (
  gdouble* d,
  gsize size,
  gsize stride,
  gpointer pdata,
  GDestroyNotify pfree
)

Description [src]

This function returns a NcmVector of the array d. This function saves userdata internally and frees it using free when it is no longer necessary.

Parameters

d

Type: An array of double

Pointer to the first double allocated.

The data is owned by the caller of the function.
size

Type: gsize

Number of doubles allocated.

stride

Type: gsize

The step-size from one element to the next in physical memory, measured in units of double.

pdata

Type: gpointer

Descending data pointer.

The argument can be NULL.
The data is owned by the caller of the function.
pfree

Type: GDestroyNotify

Free function to be called when destroying the vector.

The argument can be NULL.

Return value

Type: NcmVector

A new NcmVector.

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