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

Normal distribution function. More...

#include <normaldistribution.hpp>

+ Collaboration diagram for NormalDistribution:

Public Member Functions

 NormalDistribution (Real average=0.0, Real sigma=1.0)
 
Real operator() (Real x) const
 
Real derivative (Real x) const
 

Private Attributes

Real average_
 
Real sigma_
 
Real normalizationFactor_
 
Real denominator_
 
Real derNormalizationFactor_
 

Detailed Description

Normal distribution function.

Given x, it returns its probability in a Gaussian normal distribution. It provides the first derivative too.

Tests:
the correctness of the returned value is tested by checking it against numerical calculations. Cross-checks are also performed against the CumulativeNormalDistribution and InverseCumulativeNormal classes.

Definition at line 44 of file normaldistribution.hpp.

Constructor & Destructor Documentation

◆ NormalDistribution()

NormalDistribution ( Real  average = 0.0,
Real  sigma = 1.0 
)

Definition at line 262 of file normaldistribution.hpp.

Member Function Documentation

◆ operator()()

Real operator() ( Real  x) const

Definition at line 275 of file normaldistribution.hpp.

◆ derivative()

Real derivative ( Real  x) const

Definition at line 283 of file normaldistribution.hpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ average_

Real average_
private

Definition at line 52 of file normaldistribution.hpp.

◆ sigma_

Real sigma_
private

Definition at line 52 of file normaldistribution.hpp.

◆ normalizationFactor_

Real normalizationFactor_
private

Definition at line 52 of file normaldistribution.hpp.

◆ denominator_

Real denominator_
private

Definition at line 52 of file normaldistribution.hpp.

◆ derNormalizationFactor_

Real derNormalizationFactor_
private

Definition at line 53 of file normaldistribution.hpp.