Smooth a function by averaging in a neighborhood of points defined by a Sobol sequence. More...
#include <smooth_func.h>
Definition at line 49 of file smooth_func.h.
Public Member Functions | |
void | set_func (func_t &func) |
Set the base function. | |
void | set_n (size_t n_new) |
Set the number of points to use in the average. More... | |
template<class vec2_t > | |
void | set_step (vec2_t &v) |
Set the stepsize. | |
int | operator() (size_t nv, const vec_t &x, vec_t &y) |
Evaluate the smoothed function. More... | |
Protected Attributes | |
func_t * | f |
The pointer to the original function. | |
std::vector< double > | step |
Step size defining the neighborhood (default 0.01) | |
size_t | N |
Number of points in the Sobol sequence (default 40) | |
|
inline |
If the user-specified function returns a non-zero value for any point, then that contribution to the average is ignored. This function will return a non-zero value if the user-specified function returns a non-zero value for all of the points.
Definition at line 113 of file smooth_func.h.
|
inline |
If n_new
is zero then the error handler will be called.
Definition at line 85 of file smooth_func.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).