Skip to content

num::operators::sparse_op

Defined in header <linear/sparse/sparse_op.hpp>

struct sparse_op final;

Operator that applies a sparse matrix: \(y \leftarrow A x\).

Members

member description
using domain_type = vec<real>
using codomain_type = vec<real>
explicit sparse_op(const spmat &A) Hold a reference to A without copying it.
void apply(const vec<real> &x, vec<real> &y) const Apply the matrix: \(y \leftarrow A x\).
idx rows() const noexcept
idx cols() const noexcept