Blaze 3.9
CustomVector.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_CUSTOMVECTOR_H_
36#define _BLAZE_MATH_CUSTOMVECTOR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
50#include <blaze/util/Random.h>
51
52
53namespace blaze {
54
55//=================================================================================================
56//
57// RAND SPECIALIZATION
58//
59//=================================================================================================
60
61//*************************************************************************************************
68template< typename Type // Data type of the vector
69 , AlignmentFlag AF // Alignment flag
70 , PaddingFlag PF // Padding flag
71 , bool TF // Transpose flag
72 , typename Tag // Type tag
73 , typename RT > // Result type
74class Rand< CustomVector<Type,AF,PF,TF,Tag,RT> >
75{
76 public:
77 //**********************************************************************************************
83 inline void randomize( CustomVector<Type,AF,PF,TF,Tag,RT>& vector ) const
84 {
85 using blaze::randomize;
86
87 const size_t size( vector.size() );
88 for( size_t i=0UL; i<size; ++i ) {
89 randomize( vector[i] );
90 }
91 }
92 //**********************************************************************************************
93
94 //**********************************************************************************************
102 template< typename Arg > // Min/max argument type
103 inline void randomize( CustomVector<Type,AF,PF,TF,Tag,RT>& vector,
104 const Arg& min, const Arg& max ) const
105 {
106 using blaze::randomize;
107
108 const size_t size( vector.size() );
109 for( size_t i=0UL; i<size; ++i ) {
110 randomize( vector[i], min, max );
111 }
112 }
113 //**********************************************************************************************
114};
116//*************************************************************************************************
117
118} // namespace blaze
119
120#endif
Header file for the alignment flag enumeration.
Header file for all basic DenseVector functionality.
Header file for the complete DynamicMatrix implementation.
Header file for the complete ZeroVector implementation.
Header file for the implementation of a customizable vector.
Header file for the implementation of an arbitrarily sized vector.
Header file for the implementation of a fixed-size vector.
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1339
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1375
PaddingFlag
Padding flag for (un-)padded vectors and matrices.
Definition: PaddingFlag.h:77
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.
Definition: AlignmentFlag.h:63
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:676
void randomize(T &&value)
Randomization of a given variable.
Definition: Random.h:626
Implementation of a random number generator.