num::with_law¶
Defined in header <operator/properties.hpp>
template <class T, class L>
class with_law final;
A matrix or operator T together with a law L it claims.
It owns T, and forwards the shape, the entries and the action. A matrix without an apply acts through its entries.
Members¶
| member | description |
|---|---|
using laws = law::list<L> |
|
using domain_type = typename detail::law_space<T>::type |
|
using codomain_type = domain_type |
|
explicit with_law(T value) |
Attach L without checking it. num::assume samples it first. |
template <class Stronger> requires std::derived_from<Stronger, L> && (!std::same_as<Stronger, L>) with_law(with_law<T, Stronger> stronger) |
A value carrying a stronger law also carries L. |
const T &base() const noexcept |
|
idx rows() const |
|
idx cols() const |
|
decltype(auto) operator()(idx i, idx j) const requires requires(const T &a) |
|
template <class X, class Y> void apply(const X &x, Y &y) const |