QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
basic rounding class More...
#include <rounding.hpp>
Public Types | |
enum | Type { None , Up , Down , Closest , Floor , Ceiling } |
rounding methods More... | |
Public Member Functions | |
Rounding ()=default | |
default constructor More... | |
Rounding (Integer precision, Type type=Closest, Integer digit=5) | |
Decimal | operator() (Decimal value) const |
perform rounding More... | |
Inspectors | |
Integer | precision_ |
Type | type_ = None |
Integer | digit_ |
Integer | precision () const |
Type | type () const |
Integer | roundingDigit () const |
basic rounding class
Definition at line 35 of file rounding.hpp.
enum Type |
rounding methods
The rounding methods follow the OMG specification available at http://www.omg.org/cgi-bin/doc?formal/00-06-29.pdf.
Definition at line 44 of file rounding.hpp.
|
default |
default constructor
Instances built through this constructor don't perform any rounding.
Definition at line 71 of file rounding.hpp.
perform rounding
Definition at line 29 of file rounding.cpp.
Integer precision | ( | ) | const |
Definition at line 79 of file rounding.hpp.
Type type | ( | ) | const |
Definition at line 80 of file rounding.hpp.
Integer roundingDigit | ( | ) | const |
Definition at line 81 of file rounding.hpp.
|
private |
Definition at line 83 of file rounding.hpp.
Definition at line 84 of file rounding.hpp.
|
private |
Definition at line 85 of file rounding.hpp.