irCurveCompoundedInterpolator.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_COMPOUNDEDIRINTERPOLATOR_HPP
2 #define JULIAN_COMPOUNDEDIRINTERPOLATOR_HPP
3 
4 #include <vector>
9 #include <iostream>
10 #include <utils/smartPointer.hpp>
11 
12 
13 namespace julian {
14 namespace ir {
27  public:
34  interpolation_(interpolation), inputs_(inputs) {};
35 
36  virtual double operator()(const Calendar&,const InterestRate&, const Date& ,const std::vector<Date>&,const std::vector<double>&,const Date&) const;
37  virtual CompoundedInterpolator* clone() const;
38  virtual ~CompoundedInterpolator(){};
39  virtual std::string info() const;
40 
41  friend class boost::serialization::access;
42  private:
43  template<class Archive>
44  void serialize(Archive & ar, const unsigned int);
45 
48  };
51  template<class Archive>
52  void CompoundedInterpolator::serialize(Archive & ar, const unsigned int) {
53  boost::serialization::base_object<Interpolator>(*this);
54  ar & BOOST_SERIALIZATION_NVP(interpolation_);
55  ar & BOOST_SERIALIZATION_NVP(inputs_);
56  }
57 
61  template<class INTERPOLATOR, class INPUTS>
63  INTERPOLATOR inter;
64  INPUTS input;
65  return CompoundedInterpolator(inter,input);
66  }
67 } //namespace ir
68 } //namespace julian
69 #endif
File contains template of deep-coping smart pointer.
CompoundedInterpolator makeCompoundedInterpolator()
Simple class constructing the interpolator.
Definition: irCurveCompoundedInterpolator.hpp:62
File contains definition of interface of interest rate curve interpolator.
Definition: cadHoliday.cpp:3
void serialize(Archive &ar, const unsigned int)
interface used by Boost serialization library
Definition: irCurveCompoundedInterpolator.hpp:52
Class implements calendar object.
Definition: calendar.hpp:30
CompoundedInterpolator()
Default constructor.
Definition: irCurveCompoundedInterpolator.hpp:30
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
File contains interface of interpolation methods.
CompoundedInterpolator(SmartPointer< Interpolation > interpolation, SmartPointer< InterpolationInput > inputs)
Constructor.
Definition: irCurveCompoundedInterpolator.hpp:33
virtual std::string info() const
returns name of a class
Definition: irCurveCompoundedInterpolator.cpp:61
Class implements a date object.
Definition: date.hpp:27
virtual double operator()(const Calendar &, const InterestRate &, const Date &, const std::vector< Date > &, const std::vector< double > &, const Date &) const
interpolates curve for a given date
Definition: irCurveCompoundedInterpolator.cpp:14
SmartPointer< InterpolationInput > inputs_
interface of method transforming the DFs
Definition: irCurveCompoundedInterpolator.hpp:47
SmartPointer< Interpolation > interpolation_
interpolation interface
Definition: irCurveCompoundedInterpolator.hpp:46
The class implements the concept of interest rate.
Definition: interestRate.hpp:25
File contains interface of method that provides inputs to interpolation.
virtual CompoundedInterpolator * clone() const
virtual copy constructor
Definition: irCurveCompoundedInterpolator.cpp:55
Definition of compounded interpolator.
Definition: irCurveCompoundedInterpolator.hpp:26
File contains definition of InterestRate class.
Class implements the interface of interest rate curve interpolator.
Definition: irCurveInterpolator.hpp:25