![]() |
Blaze 3.9
|
Base template for the RepeatTrait class. More...
#include <RepeatTrait.h>
Inherits decltype evalRepeatTrait std::declval< T & >.
Base template for the RepeatTrait class.
The RepeatTrait class template offers the possibility to select the resulting data type when repeating a dense or sparse vector or matrix. RepeatTrait defines the nested type Type, which represents the resulting data type of the repeat operation. In case the given data type is not a dense or sparse vector or matrix type, there is no nested type Type. Note that const and volatile qualifiers and reference modifiers are generally ignored.
Per default, RepeatTrait 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 RepeatTrait template. The following example shows the according specialization for the DynamicVector class template:
The following example demonstrates the use of the RepeatTrait template, where depending on the given vector or matrix type the resulting type is selected: