wuzp
Wrong Unit? Zero Points! Compile-time checks for units, coordinate systems and points vs. vectors.
Loading...
Searching...
No Matches
wuzp::ValueMatrixBackend Concept Reference

A value matrix backend, given as its alias template ValueMatrix<ValueT_, RowsV_, ColsV_>, e.g. wuzp_eigen::ValueMatrix: its value matrices are ValuesWrappers of the given value type and size, and it specializes the traits the core needs for their implementation types. More...

#include <wuzp/core/concepts.hpp>

Concept definition

template<template <typename, int, int> typename ValueMatrixT_>
AnyValueMatrix<ValueMatrixT_> && internal::BackendValues<ValueMatrixT_, double> && internal::BackendValues<ValueMatrixT_, int>
The alias template ValueMatrix<ValueT_, RowsV_, ColsV_> of any value matrix backend,...
Definition concepts.hpp:89
A value matrix backend, given as its alias template ValueMatrix<ValueT_, RowsV_, ColsV_>,...
Definition concepts.hpp:338

Detailed Description

A value matrix backend, given as its alias template ValueMatrix<ValueT_, RowsV_, ColsV_>, e.g. wuzp_eigen::ValueMatrix: its value matrices are ValuesWrappers of the given value type and size, and it specializes the traits the core needs for their implementation types.

They are checked for scalars, vectors, covectors and square matrices of double and int: allocation (default construction and ReserveMemory), initialization with the elements as values of the value type (Initialize), evaluation (Evaluate of the results of the traits, which may be lazy: they are move constructible, and the matrices are constructible from them), Copy and Move (the matrices need a move constructor, but need not be copyable or assignable), element access (Coefficient), Rebind, Zero and Random, elementwise Sum, Difference, Negation, Product and Division (also with a scalar of the value type), the elementwise reciprocal CwiseInverse, a function of the elements, CwiseFunction, for the elementwise functions of quantities, e.g. pow<1, 2>(), Transpose, Block, InnerProduct, OuterProduct and CrossProduct, Norm and SquaredNorm, Comparison and printing. Random and the relative comparison Comparison::approxEqual are only checked for double: the core only uses them for floating point values. The matrix inverse and the determinant are checked by InvertibleValueMatrixBackend.

A backend checks it in its tests, e.g. static_assert(wuzp::ValueMatrixBackend<wuzp_eigen::ValueMatrix>);: the check instantiates many expressions of the backend, which takes about 0.7 s with Eigen. The core constrains its parameters with the cheap AnyValueMatrix instead.

Definition at line 338 of file concepts.hpp.