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

#include <singlefactorbsmbasketengine.hpp>

+ Collaboration diagram for SumExponentialsRootSolver:

Public Types

enum  Strategy { Ridder , Newton , Brent , Halley }
 

Public Member Functions

 SumExponentialsRootSolver (Array a, Array sig, Real K)
 
Real operator() (Real x) const
 
Real derivative (Real x) const
 
Real secondDerivative (Real x) const
 
Real getRoot (Real xTol=1e6 *QL_EPSILON, Strategy strategy=Brent) const
 
Size getFCtr () const
 
Size getDerivativeCtr () const
 
Size getSecondDerivativeCtr () const
 

Private Attributes

const Array a_
 
const Array sig_
 
const Real K_
 
Size fCtr_ = 0
 
Size fPrimeCtr_ = 0
 
Size fDoublePrimeCtr_ = 0
 

Detailed Description

Definition at line 57 of file singlefactorbsmbasketengine.hpp.

Member Enumeration Documentation

◆ Strategy

enum Strategy
Enumerator
Ridder 
Newton 
Brent 
Halley 

Definition at line 59 of file singlefactorbsmbasketengine.hpp.

Constructor & Destructor Documentation

◆ SumExponentialsRootSolver()

SumExponentialsRootSolver ( Array  a,
Array  sig,
Real  K 
)

Definition at line 36 of file singlefactorbsmbasketengine.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

Real operator() ( Real  x) const

Definition at line 43 of file singlefactorbsmbasketengine.cpp.

+ Here is the call graph for this function:

◆ derivative()

Real derivative ( Real  x) const

Definition at line 52 of file singlefactorbsmbasketengine.cpp.

+ Here is the call graph for this function:

◆ secondDerivative()

Real secondDerivative ( Real  x) const

Definition at line 61 of file singlefactorbsmbasketengine.cpp.

+ Here is the call graph for this function:

◆ getRoot()

Real getRoot ( Real  xTol = 1e6*QL_EPSILON,
Strategy  strategy = Brent 
) const

Definition at line 82 of file singlefactorbsmbasketengine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFCtr()

Size getFCtr ( ) const

Definition at line 70 of file singlefactorbsmbasketengine.cpp.

◆ getDerivativeCtr()

Size getDerivativeCtr ( ) const

Definition at line 74 of file singlefactorbsmbasketengine.cpp.

◆ getSecondDerivativeCtr()

Size getSecondDerivativeCtr ( ) const

Definition at line 78 of file singlefactorbsmbasketengine.cpp.

Member Data Documentation

◆ a_

const Array a_
private

Definition at line 74 of file singlefactorbsmbasketengine.hpp.

◆ sig_

const Array sig_
private

Definition at line 74 of file singlefactorbsmbasketengine.hpp.

◆ K_

const Real K_
private

Definition at line 75 of file singlefactorbsmbasketengine.hpp.

◆ fCtr_

Size fCtr_ = 0
mutableprivate

Definition at line 76 of file singlefactorbsmbasketengine.hpp.

◆ fPrimeCtr_

Size fPrimeCtr_ = 0
private

Definition at line 76 of file singlefactorbsmbasketengine.hpp.

◆ fDoublePrimeCtr_

Size fDoublePrimeCtr_ = 0
private

Definition at line 76 of file singlefactorbsmbasketengine.hpp.