1 | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | |
3 | /* |
4 | Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl |
5 | Copyright (C) 2003, 2004, 2005 StatPro Italia srl |
6 | |
7 | This file is part of QuantLib, a free-software/open-source library |
8 | for financial quantitative analysts and developers - http://quantlib.org/ |
9 | |
10 | QuantLib is free software: you can redistribute it and/or modify it |
11 | under the terms of the QuantLib license. You should have received a |
12 | copy of the license along with this program; if not, please email |
13 | <quantlib-dev@lists.sf.net>. The license is also available online at |
14 | <http://quantlib.org/license.shtml>. |
15 | |
16 | This program is distributed in the hope that it will be useful, but WITHOUT |
17 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
18 | FOR A PARTICULAR PURPOSE. See the license for more details. |
19 | */ |
20 | |
21 | /*! \file types.hpp |
22 | \brief Custom types |
23 | */ |
24 | |
25 | #ifndef quantlib_types_hpp |
26 | #define quantlib_types_hpp |
27 | |
28 | #include <ql/qldefines.hpp> |
29 | #include <cstddef> |
30 | |
31 | namespace QuantLib { |
32 | |
33 | //! integer number |
34 | /*! \ingroup types */ |
35 | typedef QL_INTEGER Integer; |
36 | |
37 | //! large integer number |
38 | /*! \ingroup types */ |
39 | typedef QL_BIG_INTEGER BigInteger; |
40 | |
41 | //! positive integer |
42 | /*! \ingroup types */ |
43 | typedef unsigned QL_INTEGER Natural; |
44 | |
45 | //! large positive integer |
46 | typedef unsigned QL_BIG_INTEGER BigNatural; |
47 | |
48 | //! real number |
49 | /*! \ingroup types */ |
50 | typedef QL_REAL Real; |
51 | |
52 | //! decimal number |
53 | /*! \ingroup types */ |
54 | typedef Real Decimal; |
55 | |
56 | //! size of a container |
57 | /*! \ingroup types */ |
58 | typedef std::size_t Size; |
59 | |
60 | //! continuous quantity with 1-year units |
61 | /*! \ingroup types */ |
62 | typedef Real Time; |
63 | |
64 | //! discount factor between dates |
65 | /*! \ingroup types */ |
66 | typedef Real DiscountFactor; |
67 | |
68 | //! interest rates |
69 | /*! \ingroup types */ |
70 | typedef Real Rate; |
71 | |
72 | //! spreads on interest rates |
73 | /*! \ingroup types */ |
74 | typedef Real Spread; |
75 | |
76 | //! volatility |
77 | /*! \ingroup types */ |
78 | typedef Real Volatility; |
79 | |
80 | //! probability |
81 | /*! \ingroup types */ |
82 | typedef Real Probability; |
83 | |
84 | } |
85 | |
86 | |
87 | #endif |
88 | |