#include <mcdistribution.h>
Public Member Functions | |
Function1D (float *f, int n) | |
~Function1D () | |
float | Eval (float x) const |
Public Attributes | |
float * | func |
int | count |
A utility class evaluating a regularly sampled 1D function.
Definition at line 33 of file mcdistribution.h.
lux::Function1D::Function1D | ( | float * | f, | |
int | n | |||
) | [inline] |
Creates a 1D function from the given data. It is assumed that the given function is sampled regularly sampled in the interval [0,1] (ex. 0.1, 0.3, 0.5, 0.7, 0.9 for 5 samples).
f | The values of the function. | |
n | The number of samples. |
Definition at line 43 of file mcdistribution.h.
lux::Function1D::~Function1D | ( | ) | [inline] |
Definition at line 48 of file mcdistribution.h.
References func.
float lux::Function1D::Eval | ( | float | x | ) | const [inline] |
Evaluates the function at the given position.
x | The x value to evaluate the function at. |
Definition at line 59 of file mcdistribution.h.
References Clamp(), count, func, and cimg_library::cimg::min().
Definition at line 75 of file mcdistribution.h.
Referenced by Eval(), and Function1D().
float* lux::Function1D::func |
Definition at line 71 of file mcdistribution.h.
Referenced by Eval(), Function1D(), and ~Function1D().