21#include <ql/math/solvers1d/brent.hpp>
22#include <ql/methods/finitedifferences/utilities/riskneutraldensitycalculator.hpp>
30 : calculator_(calculator),
33 maxEvaluations_(maxEvaluations),
34 stepSize_(stepSize) { }
39 return solver.
solve([&](
Real _x) ->
Real {
return calculator_->cdf(_x, t) - p; },
40 accuracy_, guess_, stepSize_);
Real inverseCDF(Real p, Time t) const
InvCDFHelper(const RiskNeutralDensityCalculator *calculator, Real guess, Real accuracy, Size maxEvaluations, Real stepSize=0.01)
void setMaxEvaluations(Size evaluations)
Real solve(const F &f, Real accuracy, Real guess, Real step) const
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container