IdentityMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_IDENTITYMATRIX_H_
36 #define _BLAZE_MATH_IDENTITYMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 #include <blaze/util/Random.h>
47 #include <blaze/util/Types.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // RAND SPECIALIZATION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
65 template< typename Type // Data type of the matrix
66  , bool SO > // Storage order
67 class Rand< IdentityMatrix<Type,SO> >
68 {
69  public:
70  //**Generate functions**************************************************************************
73  inline const IdentityMatrix<Type,SO> generate( size_t n ) const;
75  //**********************************************************************************************
76 };
78 //*************************************************************************************************
79 
80 
81 //*************************************************************************************************
88 template< typename Type // Data type of the matrix
89  , bool SO > // Storage order
90 inline const IdentityMatrix<Type,SO>
91  Rand< IdentityMatrix<Type,SO> >::generate( size_t n ) const
92 {
93  return IdentityMatrix<Type,SO>( n );
94 }
96 //*************************************************************************************************
97 
98 } // namespace blaze
99 
100 #endif
Header file for basic type definitions.
Implementation of a random number generator.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the complete CompressedVector implementation.
T generate() const
Generation of a random value in the range .
Definition: Random.h:252
Header file for the complete CompressedMatrix implementation.
Implementation of an identity matrix.