Chebyshev
Unit testing for scientific software
chebyshev::prec::estimate_options< R, Args > Class Template Reference

A structure holding the options for precision estimation. More...

#include <prec_structures.h>

Public Types

using Estimator_t = std::function< estimate_result(std::function< R(Args...)>, std::function< R(Args...)>, estimate_options)>
 

Public Member Functions

 estimate_options ()
 Construct estimate options with all default values. More...
 
 estimate_options (interval omega, Estimator_t estimator)
 Construct estimate options from a one-dimensional interval domain and an estimator, with other fields equal to the default values.
 
 estimate_options (interval omega, Estimator_t estimator, long double tolerance, bool quiet=false)
 Construct estimate options from a one-dimensional interval domain, an estimator, a tolerance and an optional quiet flag, with other fields equal to the default values.
 
 estimate_options (std::vector< interval > omega, Estimator_t estimator)
 Construct estimate options from a multidimensional interval domain and an estimator, with other fields equal to the default values.
 
 estimate_options (std::vector< interval > omega, Estimator_t estimator, long double tolerance, bool quiet=false)
 Construct estimate options from a multidimensional interval domain, an estimator, a tolerance and an optional quiet flag, with other fields equal to the default values.
 

Public Attributes

std::vector< intervaldomain {}
 The domain of estimation.
 
Estimator_t estimator
 The precision estimator to use (defaults to a dummy estimator) More...
 
long double tolerance = CHEBYSHEV_PREC_TOLERANCE
 The tolerance to use to determine whether the test failed.
 
unsigned int iterations = CHEBYSHEV_PREC_ITER
 Number of function evaluations to use.
 
FailFunction fail
 The function to determine whether the test failed (defaults to fail::fail_on_max_err). More...
 
bool quiet = false
 Whether to show the test result or not.
 

Detailed Description

template<typename R, typename ... Args>
class chebyshev::prec::estimate_options< R, Args >

A structure holding the options for precision estimation.

Constructor & Destructor Documentation

◆ estimate_options()

template<typename R , typename ... Args>
chebyshev::prec::estimate_options< R, Args >::estimate_options ( )
inline

Construct estimate options with all default values.

Note
The estimator and domain must be set to correctly use the options for test cases.

Member Data Documentation

◆ estimator

template<typename R , typename ... Args>
Estimator_t chebyshev::prec::estimate_options< R, Args >::estimator
Initial value:
= [](
std::function<R(Args...)> f1,
std::function<R(Args...)> f2,
return estimate_result();
}
estimate_options()
Construct estimate options with all default values.
Definition: prec_structures.h:116

The precision estimator to use (defaults to a dummy estimator)

◆ fail

template<typename R , typename ... Args>
FailFunction chebyshev::prec::estimate_options< R, Args >::fail
Initial value:
= [](const estimate_result& r) {
return (r.maxErr > r.tolerance) || (r.maxErr != r.maxErr);
}

The function to determine whether the test failed (defaults to fail::fail_on_max_err).


The documentation for this class was generated from the following file: