17 static_assert(std::is_floating_point_v<T>);
42 T
sampleContinuous(T sample, T* out_pdf, std::size_t* out_straddledColumn)
const;
86 std::size_t m_firstNonZeroPdfColumn;
92 T continuouslySampleValue(T sample, std::size_t straddledColumn)
const;
A 1-D piecewise constant distribution of floating-point type T. The sample weights can be seen as a h...
Definition TPwcDistribution1D.h:16
std::size_t sampleDiscrete(T sample) const
Generate an index. Given a uniform unit random sample, generate a column index according to the sampl...
Definition TPwcDistribution1D.ipp:99
T sampleContinuous(T sample) const
Generate a continuous sample. Given a uniform unit random sample, generate a continuous sample accord...
Definition TPwcDistribution1D.ipp:110
T pdfDiscrete(std::size_t columnIndex) const
Definition TPwcDistribution1D.ipp:165
T pdfContinuous(T value) const
Definition TPwcDistribution1D.ipp:150
std::size_t numColumns() const
Definition TPwcDistribution1D.ipp:142
std::size_t continuousToDiscrete(T value) const
Calculates the sampled column index given a continuously sampled value.
Definition TPwcDistribution1D.ipp:174
Math functions and utilities.
Definition TransformInfo.h:10