![]() |
Blaze 3.9
|
Base template for the SolveTrait class. More...
#include <SolveTrait.h>
Inherits decltype evalSolveTrait std::declval< T1 & >, and std::declval< T2 & >.
Base template for the SolveTrait class.
The SolveTrait class template offers the possibility to select the resulting data type for solving a linear system of equations (LSE) with the two given types T1 and T2 via the solve() operation. SolveTrait defines the nested type Type, which represents the resulting data type of the solve() operation. In case T1 and T2 cannot be combined in a solve() operation, there is no nested type Type. Note that const and volatile qualifiers and reference modifiers are generally ignored.
Per default, SolveTrait supports all vector and matrix types of the Blaze library (including views and adaptors). For all other data types it is possible to specialize the SolveTrait template. The following example shows the according specialization for solving an LSE with a static matrix and a static vector:
The following example demonstrates the use of the SolveTrait template, where depending on the two given data types the resulting data type is selected: