Gyselalib++
 
Loading...
Searching...
No Matches
matrix_corner_block.hpp
1#ifndef MATRIX_CORNER_BLOCK_H
2#define MATRIX_CORNER_BLOCK_H
3#include <memory>
4
5#include "sll/matrix.hpp"
6#include "sll/matrix_dense.hpp"
7#include "sll/view.hpp"
8
10{
11public:
12 Matrix_Corner_Block(int n, int k, std::unique_ptr<Matrix> q);
13 virtual double get_element(int i, int j) const override;
14 virtual void set_element(int i, int j, double a_ij) override;
15 virtual void factorize() override;
16 virtual DSpan1D solve_inplace(DSpan1D bx) const override;
17 virtual DSpan1D solve_transpose_inplace(DSpan1D bx) const override;
18 virtual DSpan2D solve_multiple_inplace(DSpan2D bx) const override;
19
20protected:
22 int n,
23 int k,
24 std::unique_ptr<Matrix> q,
25 int lambda_size1,
26 int lambda_size2);
27 virtual void calculate_delta_to_factorize();
28 virtual DSpan1D solve_lambda_section(DSpan1D v, DView1D u) const;
29 virtual DSpan1D solve_lambda_section_transpose(DSpan1D u, DView1D v) const;
30 virtual DSpan1D solve_gamma_section(DSpan1D const u, DView1D const v) const;
31 virtual DSpan1D solve_gamma_section_transpose(DSpan1D const v, DView1D const u) const;
32 int const k; // small block size
33 int const nb; // main block matrix size
34 std::unique_ptr<double[]> Abm_1_gamma_ptr;
35 std::unique_ptr<double[]> lambda_ptr;
36 //-------------------------------------
37 //
38 // q = | q_block | gamma |
39 // | lambda | delta |
40 //
41 //-------------------------------------
42 std::unique_ptr<Matrix> q_block;
43 Matrix_Dense delta;
44 DSpan2D Abm_1_gamma;
45 DSpan2D lambda;
46
47private:
48 virtual int factorize_method() override
49 {
50 return 0;
51 }
52 virtual int solve_inplace_method(double*, char, int) const override
53 {
54 return 0;
55 }
56};
57
58#endif // MATRIX_CORNER_BLOCK_H
Definition matrix_corner_block.hpp:10
Definition matrix_dense.hpp:8
Definition matrix.hpp:9