All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StaticVector.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_STATICVECTOR_H_
23 #define _BLAZE_MATH_STATICVECTOR_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
31 #include <blaze/math/DenseVector.h>
33 #include <blaze/system/Precision.h>
34 #include <blaze/util/Random.h>
35 
36 
37 namespace blaze {
38 
39 //=================================================================================================
40 //
41 // RAND SPECIALIZATION
42 //
43 //=================================================================================================
44 
45 //*************************************************************************************************
52 template< typename Type // Data type of the vector
53  , size_t N // Number of elements
54  , bool TF > // Transpose flag
55 class Rand< StaticVector<Type,N,TF> >
56 {
57  public:
58  //**Constructors********************************************************************************
61  explicit inline Rand();
63  //**********************************************************************************************
64 
65  //**Conversion operators************************************************************************
68  inline operator StaticVector<Type,N,TF>() const;
70  //**********************************************************************************************
71 
72  private:
73  //**Member variables****************************************************************************
76  StaticVector<Type,N,TF> vector_;
77 
78  //**********************************************************************************************
79 };
81 //*************************************************************************************************
82 
83 
84 //*************************************************************************************************
88 template< typename Type // Data type of the vector
89  , size_t N // Number of elements
90  , bool TF > // Transpose flag
92  : vector_() // The random vector
93 {
94  for( size_t i=0UL; i<N; ++i ) {
95  vector_[i] = rand<Type>();
96  }
97 }
99 //*************************************************************************************************
100 
101 
102 //*************************************************************************************************
108 template< typename Type // Data type of the vector
109  , size_t N // Number of elements
110  , bool TF > // Transpose flag
111 inline Rand< StaticVector<Type,N,TF> >::operator StaticVector<Type,N,TF>() const
112 {
113  return vector_;
114 }
116 //*************************************************************************************************
117 
118 
119 
120 
121 //=================================================================================================
122 //
123 // TYPE DEFINITIONS
124 //
125 //=================================================================================================
126 
127 //*************************************************************************************************
132 //*************************************************************************************************
133 
134 
135 //*************************************************************************************************
140 //*************************************************************************************************
141 
142 
143 //*************************************************************************************************
148 //*************************************************************************************************
149 
150 
151 //*************************************************************************************************
156 //*************************************************************************************************
157 
158 
159 //*************************************************************************************************
164 //*************************************************************************************************
165 
166 
167 //*************************************************************************************************
172 //*************************************************************************************************
173 
174 
175 //*************************************************************************************************
180 //*************************************************************************************************
181 
182 
183 //*************************************************************************************************
188 //*************************************************************************************************
189 
190 
191 //*************************************************************************************************
196 //*************************************************************************************************
197 
198 } // namespace blaze
199 
200 #endif