FirstDerivativeCostFunction.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_FIRSTDERIVATIVECOSTFUNCTION_HPP
2 #define JULIAN_FIRSTDERIVATIVECOSTFUNCTION_HPP
3 
6 #include <armadillo>
7 
8 namespace julian {
9 namespace ir {
30  public:
34  CostFunctionDecorator(c), weight_(weight) {};
35 
36  virtual arma::mat giveQmatrix(const InterpolatedCurve&) const;
37  virtual arma::mat giveCvector(const InterpolatedCurve&) const;
38  virtual double calculateCost(const InterpolatedCurve&) const;
39 
40  virtual FirstDerivativeCostFunction* clone() const;
42  private:
43  double weight_;
44  };
45 } // namespace ir
46 } // namespace julian
47 #endif
virtual double calculateCost(const InterpolatedCurve &) const
returns curve as vector of doubles
Definition: FirstDerivativeCostFunction.cpp:63
FirstDerivativeCostFunction(SmartPointer< SmootherCostFunction > c, double weight=1.0)
Constructor.
Definition: FirstDerivativeCostFunction.hpp:33
Implements the first order derivative term of cost function.
Definition: FirstDerivativeCostFunction.hpp:29
virtual FirstDerivativeCostFunction * clone() const
virtual copy constructor
Definition: FirstDerivativeCostFunction.cpp:80
Definition: cadHoliday.cpp:3
Template of deep-coping smart pointer.
Definition: smartPointer.hpp:14
File contains definition of swap interpolated curve class.
The object models the interest rate curve.
Definition: interpolatedCurve.hpp:42
Interface for classes decorating SmootherCostFunction.
Definition: CostFunctionDecorator.hpp:24
virtual arma::mat giveQmatrix(const InterpolatedCurve &) const
returns Q matrix, the quadratic term of optimization cost function
Definition: FirstDerivativeCostFunction.cpp:39
File contains implementation of abstract component of SmootherCostFunction decorator.
virtual arma::mat giveCvector(const InterpolatedCurve &) const
returns C vector
Definition: FirstDerivativeCostFunction.cpp:53
double weight_
Weight assigned to first order term (see parameter a in equation above)
Definition: FirstDerivativeCostFunction.hpp:41