Draw a random element from 1:size(this%probs) with the probabilities listed in prob while adherring to constraints
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(AliasSampler_3D_t), | intent(in) | :: | this | |||
integer, | intent(in) | :: | i |
The index of the sampler. |
||
integer, | intent(in) | :: | j |
The index of the sampler. |
||
integer, | intent(in) | :: | k |
The index of the sampler. |
||
integer, | intent(in) | :: | contain(:) |
The constraint in nI format. |
||
real(kind=dp), | intent(in) | :: | renorm |
The renormalization. (i.e. sum(this%get_prob(… contain…)) |
||
integer, | intent(out) | :: | pos |
The sampled value |
||
integer, | intent(out) | :: | tgt |
The sampled value |
||
real(kind=dp), | intent(out) | :: | prob |
The probability of sampling |