All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseColumn.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_DENSECOLUMN_H_
36 #define _BLAZE_MATH_DENSECOLUMN_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
48 #include <blaze/math/views/Row.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // RAND SPECIALIZATION
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
66 template< typename MT // Type of the dense matrix
67  , bool SO > // Storage order
68 class Rand< DenseColumn<MT,SO> >
69 {
70  public:
71  //**Randomize functions*************************************************************************
74  inline void randomize( DenseColumn<MT,SO>& column ) const;
75 
76  template< typename Arg >
77  inline void randomize( DenseColumn<MT,SO>& column, const Arg& min, const Arg& max ) const;
79  //**********************************************************************************************
80 };
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
92 template< typename MT // Type of the dense matrix
93  , bool SO > // Storage order
94 inline void Rand< DenseColumn<MT,SO> >::randomize( DenseColumn<MT,SO>& column ) const
95 {
96  using blaze::randomize;
97 
98  for( size_t i=0UL; i<column.size(); ++i ) {
99  randomize( column[i] );
100  }
101 }
103 //*************************************************************************************************
104 
105 
106 //*************************************************************************************************
115 template< typename MT // Type of the dense matrix
116  , bool SO > // Storage order
117 template< typename Arg > // Min/max argument type
118 inline void Rand< DenseColumn<MT,SO> >::randomize( DenseColumn<MT,SO>& column,
119  const Arg& min, const Arg& max ) const
120 {
121  using blaze::randomize;
122 
123  for( size_t i=0UL; i<column.size(); ++i ) {
124  randomize( column[i], min, max );
125  }
126 }
128 //*************************************************************************************************
129 
130 } // namespace blaze
131 
132 #endif
void randomize(T &value)
Randomization of a given variable.
Definition: Random.h:1043
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:103
Header file for the DenseColumn class template.
Header file for the dense vector SMP implementation.
void randomize(T &value) const
Randomization of the given variable with a new value in the range .
Definition: Random.h:262
Header file for all restructuring column functions.
Header file for the DenseRow class template.
Header file for the sparse vector SMP implementation.
Header file for all restructuring row functions.