Either samples a value from the specified distribution or observes a value against it, depending on whether data or null is passed as maybe_value.
- Template Parameters
-
| D | The type of distribution from which to sample |
| RNG | The type of PRNG to use |
| Ts | The distribution types contained in the passed record |
- Parameters
-
| r | the record into which to sample |
| address | the address at which to sample |
| dist | the distribution from which to draw sample(s) |
| rng | the PRNG to use for sampling |
| maybe_value | either the value to observe, or std::nullopt to signal that a sample is desired. |
- Returns
- DSType<D> the sampled value