Chebyshev
Unit testing for scientific software
Loading...
Searching...
No Matches
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

Public Member Functions

 estimate_options ()
 Construct estimate options with all default values.
 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, prec_t tolerance, unsigned int iterations, 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, prec_t tolerance, unsigned int iterations, 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< interval > domain {}
 The domain of estimation.
Estimator_t estimator
 The precision estimator to use (defaults to a dummy estimator).
prec_t 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).
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.

Member Typedef Documentation

◆ Estimator_t

template<typename R, typename ... Args>
using chebyshev::prec::estimate_options< R, Args >::Estimator_t
Initial value:
std::function<
std::function<R(Args...)>,
std::function<R(Args...)>,
estimate_options()
Construct estimate options with all default values.
Definition prec_structures.h:116
A structure holding the result of precision estimation.
Definition prec_structures.h:25

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();
}

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: