QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
gaussianorthogonalpolynomial.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2005, 2006 Klaus Spanderen
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_gaussian_orthogonal_polynomial_hpp
25#define quantlib_gaussian_orthogonal_polynomial_hpp
26
27#include <ql/types.hpp>
28
29namespace QuantLib {
30
32
51 public:
52 virtual ~GaussianOrthogonalPolynomial() = default;
53 virtual Real mu_0() const = 0;
54 virtual Real alpha(Size i) const = 0;
55 virtual Real beta(Size i) const = 0;
56 virtual Real w(Real x) const = 0;
57
58 Real value(Size i, Real x) const;
59 Real weightedValue(Size i, Real x) const;
60 };
61
64 public:
65 explicit GaussLaguerrePolynomial(Real s = 0.0);
66
67 Real mu_0() const override;
68 Real alpha(Size i) const override;
69 Real beta(Size i) const override;
70 Real w(Real x) const override;
71
72 private:
73 const Real s_;
74 };
75
78 public:
79 explicit GaussHermitePolynomial(Real mu = 0.0);
80
81 Real mu_0() const override;
82 Real alpha(Size i) const override;
83 Real beta(Size i) const override;
84 Real w(Real x) const override;
85
86 private:
87 const Real mu_;
88 };
89
92 public:
94
95 Real mu_0() const override;
96 Real alpha(Size i) const override;
97 Real beta(Size i) const override;
98 Real w(Real x) const override;
99
100 private:
102 const Real beta_;
103 };
104
107 public:
109 };
110
113 public:
115 };
116
119 public:
121 };
122
125 public:
126 explicit GaussGegenbauerPolynomial(Real lambda);
127 };
128
131 public:
132 Real mu_0() const override;
133 Real alpha(Size i) const override;
134 Real beta(Size i) const override;
135 Real w(Real x) const override;
136 };
137
138}
139
140#endif
Gauss-Chebyshev polynomial (second kind)
orthogonal polynomial for Gaussian quadratures
virtual ~GaussianOrthogonalPolynomial()=default
virtual Real alpha(Size i) const =0
virtual Real beta(Size i) const =0
virtual Real w(Real x) const =0
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35