All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StaticMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_STATICMATRIX_H_
23 #define _BLAZE_MATH_STATICMATRIX_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
31 #include <blaze/math/DenseMatrix.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 matrix
53  , size_t M // Number of rows
54  , size_t N // Number of columns
55  , bool SO > // Storage order
56 class Rand< StaticMatrix<Type,M,N,SO> >
57 {
58  public:
59  //**Constructors********************************************************************************
62  explicit inline Rand();
64  //**********************************************************************************************
65 
66  //**Conversion operators************************************************************************
69  inline operator StaticMatrix<Type,M,N,SO>() const;
71  //**********************************************************************************************
72 
73  private:
74  //**Member variables****************************************************************************
77  StaticMatrix<Type,M,N,SO> matrix_;
78 
79  //**********************************************************************************************
80 };
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
89 template< typename Type // Data type of the matrix
90  , size_t M // Number of rows
91  , size_t N // Number of columns
92  , bool SO > // Storage order
94  : matrix_() // The random matrix
95 {
96  for( size_t i=0UL; i<M; ++i ) {
97  for( size_t j=0UL; j<N; ++j ) {
98  matrix_(i,j) = rand<Type>();
99  }
100  }
101 }
103 //*************************************************************************************************
104 
105 
106 //*************************************************************************************************
112 template< typename Type // Data type of the matrix
113  , size_t M // Number of rows
114  , size_t N // Number of columns
115  , bool SO > // Storage order
116 inline Rand< StaticMatrix<Type,M,N,SO> >::operator StaticMatrix<Type,M,N,SO>() const
117 {
118  return matrix_;
119 }
121 //*************************************************************************************************
122 
123 
124 
125 
126 //=================================================================================================
127 //
128 // TYPE DEFINITIONS
129 //
130 //=================================================================================================
131 
132 //*************************************************************************************************
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
145 //*************************************************************************************************
146 
147 
148 //*************************************************************************************************
153 //*************************************************************************************************
154 
155 
156 //*************************************************************************************************
161 //*************************************************************************************************
162 
163 
164 //*************************************************************************************************
169 //*************************************************************************************************
170 
171 
172 //*************************************************************************************************
177 //*************************************************************************************************
178 
179 
180 //*************************************************************************************************
185 //*************************************************************************************************
186 
187 
188 //*************************************************************************************************
193 //*************************************************************************************************
194 
195 
196 //*************************************************************************************************
201 //*************************************************************************************************
202 
203 
204 //*************************************************************************************************
209 //*************************************************************************************************
210 
211 
212 //*************************************************************************************************
217 //*************************************************************************************************
218 
219 
220 //*************************************************************************************************
225 //*************************************************************************************************
226 
227 
228 //*************************************************************************************************
233 //*************************************************************************************************
234 
235 
236 //*************************************************************************************************
241 //*************************************************************************************************
242 
243 
244 //*************************************************************************************************
249 //*************************************************************************************************
250 
251 } // namespace blaze
252 
253 #endif