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

Distribution over a number of dates. More...

#include <timebasket.hpp>

+ Inheritance diagram for TimeBasket:
+ Collaboration diagram for TimeBasket:

Public Member Functions

 TimeBasket ()=default
 
 TimeBasket (const std::vector< Date > &dates, const std::vector< Real > &values)
 
Algebra
TimeBasketoperator+= (const TimeBasket &other)
 
TimeBasketoperator-= (const TimeBasket &other)
 
Other methods
TimeBasket rebin (const std::vector< Date > &buckets) const
 redistribute the entries over the given dates More...
 

Private Types

typedef std::map< Date, Realsuper
 

Map interface

typedef super::iterator iterator
 
typedef super::const_iterator const_iterator
 
typedef super::reverse_iterator reverse_iterator
 
typedef super::const_reverse_iterator const_reverse_iterator
 
bool hasDate (const Date &) const
 membership More...
 

Detailed Description

Distribution over a number of dates.

Definition at line 36 of file timebasket.hpp.

Member Typedef Documentation

◆ super

typedef std::map<Date,Real> super
private

Definition at line 38 of file timebasket.hpp.

◆ iterator

typedef super::iterator iterator

Definition at line 50 of file timebasket.hpp.

◆ const_iterator

typedef super::const_iterator const_iterator

Definition at line 51 of file timebasket.hpp.

◆ reverse_iterator

typedef super::reverse_iterator reverse_iterator

Definition at line 52 of file timebasket.hpp.

◆ const_reverse_iterator

typedef super::const_reverse_iterator const_reverse_iterator

Definition at line 53 of file timebasket.hpp.

Constructor & Destructor Documentation

◆ TimeBasket() [1/2]

TimeBasket ( )
default

◆ TimeBasket() [2/2]

TimeBasket ( const std::vector< Date > &  dates,
const std::vector< Real > &  values 
)

Definition at line 27 of file timebasket.cpp.

Member Function Documentation

◆ hasDate()

bool hasDate ( const Date d) const

membership

Definition at line 76 of file timebasket.hpp.

◆ operator+=()

TimeBasket & operator+= ( const TimeBasket other)

Definition at line 81 of file timebasket.hpp.

◆ operator-=()

TimeBasket & operator-= ( const TimeBasket other)

Definition at line 88 of file timebasket.hpp.

◆ rebin()

TimeBasket rebin ( const std::vector< Date > &  buckets) const

redistribute the entries over the given dates

Definition at line 36 of file timebasket.cpp.