Skip to content

num::band_mat

Defined in header <linear/banded/banded.hpp>

class band_mat;

Banded matrix in LAPACK band storage: \(a_{ij}\) at band row \(k_l + k_u + i - j\).

Members

member description
band_mat(idx n, idx kl, idx ku) Construct an \(n \times n\) band matrix of zeros with bandwidths \(k_l, k_u\).
band_mat(idx n, idx kl, idx ku, real val) Construct an \(n \times n\) band matrix with every band entry equal 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 order \(n\).
idx rows() const
idx cols() const
idx kl() const Return the lower bandwidth \(k_l\).
idx ku() const Return the upper bandwidth \(k_u\).
idx bandwidth() const Return the number of diagonals: \(k_l + k_u + 1\).
idx ldab() const Return the leading dimension of the band storage.
real &operator()(idx i, idx j) Access the entry \(a_{ij}\) inside the band.
real operator()(idx i, idx j) const
real &band(idx band_row, idx col) Access an entry by its row and column in the band storage.
real band(idx band_row, idx col) const
real *data()
const real *data() const
bool in_band(idx i, idx j) const Test whether \(a_{ij}\) lies inside the band.
void to_gpu()
void to_cpu()
real *gpu_data()
const real *gpu_data() const
bool on_gpu() const