Subroutine for subsampling a rank 1 array using Poisson sampling (subjecting individual elements independently to Bernoulli experiments), then generates an index mask for sampling.
Subroutine for sampling a rank 1 array using Poisson sampling (subjecting individual elements independently to Bernoulli experiments), then generates an index mask for sampling. The mask can simply be applied using the pack intrinsic function: new_array = pack (old_array, mask)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | m |
size of population (array) |
||
| real(kind=wp), | intent(in) | :: | p |
inclusion probability |
||
| logical, | intent(out) | :: | mask(m) |
index mask for sampled data |