Gyselalib++
 
Loading...
Searching...
No Matches
matrix_banded.hpp
1#ifndef MATRIX_BANDED_H
2#define MATRIX_BANDED_H
3#include <memory>
4
5#include "sll/matrix.hpp"
6
7class Matrix_Banded : public Matrix
8{
9public:
10 Matrix_Banded(int n, int kl, int ku);
11 virtual double get_element(int i, int j) const override;
12 virtual void set_element(int i, int j, double a_ij) override;
13
14protected:
15 virtual int factorize_method() override;
16 virtual int solve_inplace_method(double* b, char transpose, int n_equations) const override;
17 int const kl; // no. of subdiagonals
18 int const ku; // no. of superdiagonals
19 int const c; // no. of columns in q
20 std::unique_ptr<int[]> ipiv; // pivot indices
21 std::unique_ptr<double[]> q; // banded matrix representation
22};
23
24#endif // MATRIX_BANDED_H
Definition matrix_banded.hpp:8
Definition matrix.hpp:9