Skip to content

Commit

Permalink
remove template version, just support QuantLib::Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaspers committed Mar 21, 2024
1 parent 85448fc commit 5727400
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions ql/experimental/math/laplaceinterpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ namespace QuantLib {
}
}

template <class M>
void laplaceInterpolation(M& A,
void laplaceInterpolation(Matrix& A,
const std::vector<Real>& x,
const std::vector<Real>& y,
Real relTol) {
Expand Down Expand Up @@ -243,11 +242,4 @@ namespace QuantLib {
}
}

// template instantiations for matrix classes we want to support

template void laplaceInterpolation(Matrix& A,
const std::vector<Real>& x,
const std::vector<Real>& y,
Real relTol);

} // namespace QuantLib
4 changes: 2 additions & 2 deletions ql/experimental/math/laplaceinterpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define quantlib_laplace_interpolation

#include <ql/math/array.hpp>
#include <ql/math/matrix.hpp>
#include <ql/shared_ptr.hpp>
#include <ql/types.hpp>

Expand Down Expand Up @@ -64,8 +65,7 @@ namespace QuantLib {
/*! Convenience function that Laplace-interpolates null values in a given matrix.
If the x or y grid or both are not given, an equidistant grid is assumed. */

template <class M>
void laplaceInterpolation(M& A,
void laplaceInterpolation(Matrix& A,
const std::vector<Real>& x = {},
const std::vector<Real>& y = {},
Real relTol = 1E-6);
Expand Down

0 comments on commit 5727400

Please sign in to comment.