QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
Brent Class Reference

Brent 1-D solver More...

#include <brent.hpp>

+ Inheritance diagram for Brent:
+ Collaboration diagram for Brent:

Public Member Functions

template<class F >
Real solveImpl (const F &f, Real xAccuracy) const
 
- Public Member Functions inherited from Solver1D< Brent >
 Solver1D ()=default
 
Real solve (const F &f, Real accuracy, Real guess, Real step) const
 
Real solve (const F &f, Real accuracy, Real guess, Real xMin, Real xMax) const
 
void setMaxEvaluations (Size evaluations)
 
void setLowerBound (Real lowerBound)
 sets the lower bound for the function domain More...
 
void setUpperBound (Real upperBound)
 sets the upper bound for the function domain More...
 

Private Member Functions

Real sign (Real a, Real b) const
 

Additional Inherited Members

- Protected Member Functions inherited from CuriouslyRecurringTemplate< Impl >
 CuriouslyRecurringTemplate ()=default
 
 ~CuriouslyRecurringTemplate ()=default
 
Impl & impl ()
 
const Impl & impl () const
 
- Protected Attributes inherited from Solver1D< Brent >
Real root_
 
Real xMin_
 
Real xMax_
 
Real fxMin_
 
Real fxMax_
 
Size maxEvaluations_
 
Size evaluationNumber_
 

Detailed Description

Brent 1-D solver

Tests:
the correctness of the returned values is tested by checking them against known good results.

Definition at line 37 of file brent.hpp.

Member Function Documentation

◆ solveImpl()

Real solveImpl ( const F f,
Real  xAccuracy 
) const

Definition at line 40 of file brent.hpp.

+ Here is the call graph for this function:

◆ sign()

Real sign ( Real  a,
Real  b 
) const
private

Definition at line 135 of file brent.hpp.

+ Here is the caller graph for this function: