Helper class for drawing samples from a TruncatedGaussian.
More...
#include <TruncatedGaussian.h>
|
| TruncatedGaussianSampler (TruncatedGaussian const &parent, TruncatedGaussian::SampleStrategy strategy) |
|
Scalar | operator() (afw::math::Random &rng, ndarray::Array< Scalar, 1, 1 > const &alpha) const |
| Draw a single sample from a TruncatedGaussian. More...
|
|
void | operator() (afw::math::Random &rng, ndarray::Array< Scalar, 2, 1 > const &alpha, ndarray::Array< Scalar, 1, 1 > const &weights, bool multiplyWeights=false) const |
| Draw multiple samples from a TruncatedGaussian. More...
|
|
| ~TruncatedGaussianSampler () |
|
Helper class for drawing samples from a TruncatedGaussian.
Definition at line 300 of file TruncatedGaussian.h.
◆ TruncatedGaussianSampler()
◆ ~TruncatedGaussianSampler()
lsst::meas::modelfit::TruncatedGaussianSampler::~TruncatedGaussianSampler |
( |
| ) |
|
◆ operator()() [1/2]
Scalar lsst::meas::modelfit::TruncatedGaussianSampler::operator() |
( |
afw::math::Random & |
rng, |
|
|
ndarray::Array< Scalar, 1, 1 > const & |
alpha |
|
) |
| const |
Draw a single sample from a TruncatedGaussian.
- Parameters
-
[in] | rng | Random number generator |
[out] | alpha | Output sample vector to fill |
- Returns
- the weight of the sample (always betweeen 0 and 1)
◆ operator()() [2/2]
void lsst::meas::modelfit::TruncatedGaussianSampler::operator() |
( |
afw::math::Random & |
rng, |
|
|
ndarray::Array< Scalar, 2, 1 > const & |
alpha, |
|
|
ndarray::Array< Scalar, 1, 1 > const & |
weights, |
|
|
bool |
multiplyWeights = false |
|
) |
| const |
Draw multiple samples from a TruncatedGaussian.
- Parameters
-
[in] | rng | Random number generator |
[out] | alpha | Output sample vector to fill; first dimension sets the number of samples |
[out] | weights | Output weight vector to fill |
[in] | multiplyWeights | If true, multiply the weights vector by the weights rather than fill it. |
The documentation for this class was generated from the following file:
- /j/snowflake/release/lsstsw/stack/1a1d771/Linux64/meas_modelfit/20.0.0/include/lsst/meas/modelfit/TruncatedGaussian.h