Method

NumCosmoMathVectorget_subvector2

Declaration [src]

void
ncm_vector_get_subvector2 (
  NcmVector* sub_cv,
  NcmVector* cv,
  const gsize k,
  const gsize size
)

Description [src]

This function sets sub_cv to be a subvector of the vector cv. The start of the new vector is the component k from the original vector cv. The new vector has size elements.

It is assumed that sub_cv is a static vector allocated with ncm_vector_new_data_static(). If a different type of vector is passed then the function will lead to a memory leak.

Parameters

cv

Type: NcmVector

A NcmVector.

The data is owned by the caller of the method.
k

Type: const gsize

Component index of the original vector.

size

Type: const gsize

Number of components of the subvector.