num::operators::callable_op¶
Defined in header <operator/callable.hpp>
template <class F>
struct callable_op final;
Operator defined by a function f(const vec &, vec &): \(y \leftarrow f(x)\).
Members¶
| member | description |
|---|---|
using domain_type = vec<real> |
|
using codomain_type = vec<real> |
|
callable_op(F f, idx rows, idx cols) |
Construct a rows x cols operator from a function. |
callable_op(F f, idx n) |
Construct an n x n operator from a function. |
void apply(const vec<real> &x, vec<real> &y) const |
Apply the operator, resizing y if needed: \(y \leftarrow A x\). |
idx rows() const noexcept |
|
idx cols() const noexcept |