num::band_mat¶
Defined in header <linear/banded/banded.hpp>
class band_mat;
LAPACK-style band storage.
Stores \(A_{ij}\) at \(\text{band}(k_l+k_u+i-j,j)\) when \(\max(0,j-k_u)\le i\le \min(n-1,j+k_l)\).
Members¶
| member | description |
|---|---|
band_mat(idx n, idx kl, idx ku) |
Construct a zero-filled n-by-n matrix with lower/upper bandwidths kl/ku. |
band_mat(idx n, idx kl, idx ku, real val) |
Construct a banded matrix with every stored entry initialized to val. |
band_mat(const band_mat &) |
|
band_mat(band_mat &&) noexcept |
|
band_mat &operator=(const band_mat &) |
|
band_mat &operator=(band_mat &&) noexcept |
|
idx size() const |
Return the square matrix order. |
idx rows() const |
|
idx cols() const |
|
idx kl() const |
Return the lower bandwidth. |
idx ku() const |
Return the upper bandwidth. |
idx bandwidth() const |
Return the number of mathematical diagonals in the band. |
idx ldab() const |
Return the leading dimension of the LAPACK-compatible storage. |
real &operator()(idx i, idx j) |
Access a mathematical matrix entry inside the stored band. |
real operator()(idx i, idx j) const |
|
real &band(idx band_row, idx col) |
Access an entry by physical band-storage coordinates. |
real band(idx band_row, idx col) const |
|
real *data() |
|
const real *data() const |
|
bool in_band(idx i, idx j) const |
Test whether mathematical entry (i,j) is explicitly stored. |
void to_gpu() |
|
void to_cpu() |
|
real *gpu_data() |
|
const real *gpu_data() const |
|
bool on_gpu() const |