Gyselalib++
 
Loading...
Searching...
No Matches
matrix_center_block.hpp
1#ifndef MATRIX_CENTER_BLOCK_H
2#define MATRIX_CENTER_BLOCK_H
3#include <memory>
4
5#include "sll/matrix_corner_block.hpp"
6#include "sll/view.hpp"
7
8class Matrix;
9
11{
12public:
14 int n,
15 int top_block_size,
16 int bottom_block_size,
17 std::unique_ptr<Matrix> q);
18 virtual double get_element(int i, int j) const override;
19 virtual void set_element(int i, int j, double a_ij) override;
20 virtual DSpan1D solve_inplace(DSpan1D bx) const override;
21 virtual DSpan1D solve_transpose_inplace(DSpan1D bx) const override;
22 virtual DSpan2D solve_multiple_inplace(DSpan2D bx) const override;
23
24protected:
25 void adjust_indexes(int& i, int& j) const;
26 DSpan1D swap_array_to_corner(DSpan1D bx) const;
27 DSpan1D swap_array_to_center(DSpan1D bx) const;
28 DSpan2D swap_array_to_corner(DSpan2D bx) const;
29 DSpan2D swap_array_to_center(DSpan2D bx) const;
30 int const top_block_size;
31 int const bottom_block_size;
32 int const bottom_block_index;
33 std::unique_ptr<double[]> swap_array;
34};
35
36#endif // MATRIX_CENTER_BLOCK_H
Definition matrix_center_block.hpp:11
Definition matrix_corner_block.hpp:10
Definition matrix.hpp:9