[QuantLibAddin-cvs] QuantLibAddin/qlo interpolation.cpp,1.9,1.10
Brought to you by:
ericehlers,
nando
|
From: Ferdinando A. <na...@us...> - 2006-06-23 17:16:29
|
Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31020/qlo Modified Files: interpolation.cpp Log Message: QuantLib::Extrapolator is the right base class Index: interpolation.cpp =================================================================== RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/interpolation.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** interpolation.cpp 20 Jun 2006 09:18:11 -0000 1.9 --- interpolation.cpp 23 Jun 2006 17:16:26 -0000 1.10 *************** *** 32,42 **** const LinearInterpolationType t, const std::vector<double>& x, ! const std::vector<double>& y) : x_(x), y_(y) { ! QL_REQUIRE(x.size()==y.size(), "unmatched x/y"); switch (t) { case LinearType: ! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>( new QuantLib::LinearInterpolation(x_.begin(), x_.end(), --- 32,42 ---- const LinearInterpolationType t, const std::vector<double>& x, ! const std::vector<double>& y) : x_(x), y_(y) ! { QL_REQUIRE(x.size()==y.size(), "unmatched x/y"); switch (t) { case LinearType: ! libraryObject_ = boost::shared_ptr<QuantLib::Extrapolator>( new QuantLib::LinearInterpolation(x_.begin(), x_.end(), *************** *** 44,48 **** break; case BackwardFlatType: ! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>( new QuantLib::BackwardFlatInterpolation(x_.begin(), x_.end(), --- 44,48 ---- break; case BackwardFlatType: ! libraryObject_ = boost::shared_ptr<QuantLib::Extrapolator>( new QuantLib::BackwardFlatInterpolation(x_.begin(), x_.end(), *************** *** 50,54 **** break; case ForwardFlatType: ! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>( new QuantLib::ForwardFlatInterpolation(x_.begin(), x_.end(), --- 50,54 ---- break; case ForwardFlatType: ! libraryObject_ = boost::shared_ptr<QuantLib::Extrapolator>( new QuantLib::ForwardFlatInterpolation(x_.begin(), x_.end(), *************** *** 69,77 **** QuantLib::CubicSpline::BoundaryCondition rightCondition, double rightConditionValue, ! bool monotonicityConstraint) : x_(x), y_(y) { ! QL_REQUIRE(x.size()==y.size(), "unmatched x/y"); ! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>( new QuantLib::CubicSpline( x_.begin(), x_.end(), y_.begin(), --- 69,77 ---- QuantLib::CubicSpline::BoundaryCondition rightCondition, double rightConditionValue, ! bool monotonicityConstraint) : x_(x), y_(y) ! { QL_REQUIRE(x.size()==y.size(), "unmatched x/y"); ! libraryObject_ = boost::shared_ptr<QuantLib::Extrapolator>( new QuantLib::CubicSpline( x_.begin(), x_.end(), y_.begin(), *************** *** 91,97 **** double nu, double alpha, ! double rho) : x_(x), y_(y) { ! ! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>( new QuantLib::SABRInterpolation( x_.begin(), x_.end(), y_.begin(), --- 91,97 ---- double nu, double alpha, ! double rho) : x_(x), y_(y) ! { ! libraryObject_ = boost::shared_ptr<QuantLib::Extrapolator>( new QuantLib::SABRInterpolation( x_.begin(), x_.end(), y_.begin(), |