QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
householder.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2024 Klaus Spanderen
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file householder.hpp
21 \brief Householder transformation and Householder projection
22*/
23
24#ifndef quantlib_householder_hpp
25#define quantlib_householder_hpp
26
27#include <ql/math/matrix.hpp>
28
29namespace QuantLib {
30
31 /*! References:
32 https://en.wikipedia.org/wiki/Householder_transformation
33 */
34
36 public:
38
39 Matrix getMatrix() const;
40 Array operator()(const Array& x) const;
41
42 private:
43 const Array v_;
44 };
45
46
48 public:
49 explicit HouseholderReflection(Array e);
50
51 Array operator()(const Array& a) const;
52 Array reflectionVector(const Array& a) const;
53
54 private:
55 const Array e_;
56 };
57}
58
59#endif
1-D array used in linear algebra.
Definition: array.hpp:52
Array reflectionVector(const Array &a) const
Definition: householder.cpp:47
Array operator()(const Array &a) const
Definition: householder.cpp:74
Array operator()(const Array &x) const
Definition: householder.cpp:28
Matrix used in linear algebra.
Definition: matrix.hpp:41
matrix used in linear algebra.
Definition: any.hpp:37
ext::shared_ptr< BlackVolTermStructure > v