adaptive drawing of a function graph, specified by two function and evaluated over a parameter range
More...
#include <jkqtpgeometrytools.h >
JKQTPAdaptiveFunctionGraphEvaluator (const std::function< double(double)> &fx_, const std::function< double(double)> &fy_, unsigned int minSamples_=10, unsigned int maxRefinementDegree_=5, double slopeTolerance_=0.005, double minPixelPerSample_=32)
class constructor
JKQTPAdaptiveFunctionGraphEvaluator (const std::function< QPointF(double)> &fxy_, unsigned int minSamples_=10, unsigned int maxRefinementDegree_=5, double slopeTolerance_=0.005, double minPixelPerSample_=32)
class constructor
QVector< QPointF > evaluate (double tmin=0.0, double tmax=1.0) const
evaluate the function specified in the constructor over the given parameter range tmin ... tmax
typedef std::forward_list< std::pair< double, QPointF > > InternalList
void refine (InternalList &data, InternalList::iterator a, InternalList::iterator b, unsigned int degree) const
refine (if necessary) the function graph between the two points a and b , working on the given list of data data
std::uniform_real_distribution< double > dist
random number generation: distribution
std::function< double(double)> fx
function
std::function< QPointF(double)> fxy
function
std::function< double(double)> fy
function
std::mt19937 gen
random number generation: egenrator
unsigned int maxRefinementDegree
the maximum number of recursive refinement steps
double minPixelPerSample
create one sample at least every minPixelPerSample pixels
unsigned int minSamples
the minimum number of points to evaluate the function at
std::random_device rd
random number generation: device
double slopeTolerance
the tolerance for the difference of two subsequent slopes
◆ InternalList
◆ JKQTPAdaptiveFunctionGraphEvaluator() [1/2]
JKQTPAdaptiveFunctionGraphEvaluator::JKQTPAdaptiveFunctionGraphEvaluator
(
const std::function< double(double)> &
fx_ ,
const std::function< double(double)> &
fy_ ,
unsigned int
minSamples_ = 10
,
unsigned int
maxRefinementDegree_ = 5
,
double
slopeTolerance_ = 0.005
,
double
minPixelPerSample_ = 32
)
class constructor
Parameters
◆ JKQTPAdaptiveFunctionGraphEvaluator() [2/2]
JKQTPAdaptiveFunctionGraphEvaluator::JKQTPAdaptiveFunctionGraphEvaluator
(
const std::function< QPointF(double)> &
fxy_ ,
unsigned int
minSamples_ = 10
,
unsigned int
maxRefinementDegree_ = 5
,
double
slopeTolerance_ = 0.005
,
double
minPixelPerSample_ = 32
)
class constructor
Parameters
◆ evaluate()
QVector< QPointF > JKQTPAdaptiveFunctionGraphEvaluator::evaluate
(
double
tmin = 0.0
,
double
tmax = 1.0
)
const
evaluate the function specified in the constructor over the given parameter range tmin ... tmax
Parameters
tmin lower parameter range limit
tmax upper parameter range limit
◆ refine()
void JKQTPAdaptiveFunctionGraphEvaluator::refine
(
InternalList &
data ,
InternalList::iterator
a ,
InternalList::iterator
b ,
unsigned int
degree
)
const
protected
refine (if necessary) the function graph between the two points a and b , working on the given list of data data
◆ dist
std::uniform_real_distribution<double> JKQTPAdaptiveFunctionGraphEvaluator::dist
mutable protected
random number generation: distribution
◆ fx
std::function<double(double)> JKQTPAdaptiveFunctionGraphEvaluator::fx
protected
function
◆ fxy
std::function<QPointF(double)> JKQTPAdaptiveFunctionGraphEvaluator::fxy
protected
function
◆ fy
std::function<double(double)> JKQTPAdaptiveFunctionGraphEvaluator::fy
protected
function
◆ gen
std::mt19937 JKQTPAdaptiveFunctionGraphEvaluator::gen
mutable protected
random number generation: egenrator
◆ maxRefinementDegree
unsigned int JKQTPAdaptiveFunctionGraphEvaluator::maxRefinementDegree
protected
the maximum number of recursive refinement steps
each step bisects the interval into two halfes. So the maximum number of points plotted at all are thus:
◆ minPixelPerSample
double JKQTPAdaptiveFunctionGraphEvaluator::minPixelPerSample
protected
create one sample at least every minPixelPerSample pixels
◆ minSamples
unsigned int JKQTPAdaptiveFunctionGraphEvaluator::minSamples
protected
the minimum number of points to evaluate the function at
◆ rd
std::random_device JKQTPAdaptiveFunctionGraphEvaluator::rd
mutable protected
random number generation: device
◆ slopeTolerance
double JKQTPAdaptiveFunctionGraphEvaluator::slopeTolerance
protected
the tolerance for the difference of two subsequent slopes
The documentation for this class was generated from the following file: