Method

NumCosmoMathRNGchoose

Declaration [src]

void
ncm_rng_choose (
  NcmRNG* rng,
  void* dest,
  size_t k,
  void* src,
  size_t n,
  size_t size
)

Description [src]

This function fills the array dest with k elements from the array src. The elements are chosen randomly using the algorithm (choose with replecement) in gsl_ran_choose().

Parameters

dest

Type: void*

An array of k elements of size size.

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

Type: size_t

Number of elements in dest.

src

Type: void*

An array of n elements of size size.

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

Type: size_t

Number of elements in src.

size

Type: size_t

Size of each element in dest and src.