Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
klausspanderen committed Nov 10, 2024
1 parent 90cf671 commit 8c1e9ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ql/math/integrals/gaussianquadratures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace QuantLib {
}


MulitDimGaussianIntegration::MulitDimGaussianIntegration(
MultiDimGaussianIntegration::MultiDimGaussianIntegration(
const std::vector<Size>& ns,
const std::function<ext::shared_ptr<GaussianQuadrature>(Size)>& genQuad)
: weights_(std::accumulate(ns.begin(), ns.end(), Size(1), std::multiplies<>()), 1.0),
Expand Down Expand Up @@ -93,7 +93,7 @@ namespace QuantLib {
}
}

Real MulitDimGaussianIntegration::operator()(
Real MultiDimGaussianIntegration::operator()(
const std::function<Real(Array)>& f) const {
Real s = 0.0;
const Size n = x_.size();
Expand Down
4 changes: 2 additions & 2 deletions ql/math/integrals/gaussianquadratures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ namespace QuantLib {
Array x_, w_;
};

class MulitDimGaussianIntegration {
class MultiDimGaussianIntegration {
public:
MulitDimGaussianIntegration(
MultiDimGaussianIntegration(
const std::vector<Size>& ns,
const std::function<ext::shared_ptr<GaussianQuadrature>(Size)>& genQuad);

Expand Down
2 changes: 1 addition & 1 deletion ql/pricingengines/basket/choibasketengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ namespace QuantLib {
[](Real acc, Real x) -> Real { return acc + x*x; }
);

MulitDimGaussianIntegration ghq(
MultiDimGaussianIntegration ghq(
nIntOrder,
[](const Size n) { return ext::make_shared<GaussHermiteIntegration>(n); }
);
Expand Down
8 changes: 4 additions & 4 deletions test-suite/gaussianquadratures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(testMultiDimensionalGaussIntegration) {
std::vector<Size> ns(n);
std::iota(ns.begin(), ns.end(), Size(1));

MulitDimGaussianIntegration quad(
MultiDimGaussianIntegration quad(
ns,
[](const Size n) {
return ext::make_shared<GaussHermiteIntegration>(n);
Expand Down Expand Up @@ -372,7 +372,7 @@ BOOST_AUTO_TEST_CASE(testMultiDimensionalGaussIntegration) {
const Matrix invA = inverse(A);
const Real det_2piA = std::sqrt(determinant(M_TWOPI*invA));

const MulitDimGaussianIntegration quad(
const MultiDimGaussianIntegration quad(
std::vector<Size>(ns.begin(), ns.begin()+n),
[](const Size n) { return ext::make_shared<GaussHermiteIntegration>(n); }
);
Expand Down Expand Up @@ -404,11 +404,11 @@ BOOST_AUTO_TEST_CASE(testMultiDimensionalGaussIntegration) {
const Matrix invA = inverse(A);
const Real sqrt_det_2piA = std::sqrt(determinant(M_TWOPI*invA));

const MulitDimGaussianIntegration quadHigh(
const MultiDimGaussianIntegration quadHigh(
std::vector<Size>({22, 18, 26}),
[](const Size n) { return ext::make_shared<GaussHermiteIntegration>(n); }
);
const MulitDimGaussianIntegration quad2(
const MultiDimGaussianIntegration quad2(
std::vector<Size>(3, 2),
[](const Size n) { return ext::make_shared<GaussHermiteIntegration>(n); }
);
Expand Down

0 comments on commit 8c1e9ac

Please sign in to comment.