QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
studenttdistribution.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 Roland Lichters
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_student_t_distribution_hpp
25#define quantlib_student_t_distribution_hpp
26
27#include <ql/errors.hpp>
28#include <ql/types.hpp>
29#include <functional>
30
31namespace QuantLib {
32
34
43 public:
47 QL_DEPRECATED
49
53 QL_DEPRECATED
55
57 QL_REQUIRE(n > 0, "invalid parameter for t-distribution");
58 }
59 Real operator()(Real x) const;
60 private:
62 };
63
65
77 public:
81 QL_DEPRECATED
83
87 QL_DEPRECATED
89
91 QL_REQUIRE(n > 0, "invalid parameter for t-distribution");
92 }
93 Real operator()(Real x) const;
94 private:
96 };
97
99
104 public:
108 QL_DEPRECATED
110
114 QL_DEPRECATED
116
118 Real accuracy = 1e-6,
119 Size maxIterations = 50)
120 : d_(n), f_(n), accuracy_(accuracy),
121 maxIterations_(maxIterations) {}
122 Real operator()(Real x) const;
123 private:
128 };
129
130}
131
132#endif
Cumulative Student t-distribution.
Inverse cumulative Student t-distribution.
InverseCumulativeStudent(Integer n, Real accuracy=1e-6, Size maxIterations=50)
CumulativeStudentDistribution f_
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
QL_REAL Real
real number
Definition: types.hpp:50
QL_INTEGER Integer
integer number
Definition: types.hpp:35
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35