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 
46 #include <blaze/math/views/Row.h>
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // RAND SPECIALIZATION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
64 template< typename MT // Type of the dense matrix
65  , bool SO > // Storage order
66 class Rand< DenseColumn<MT,SO> >
67 {
68  public:
69  //**Randomize functions*************************************************************************
72  inline void randomize( DenseColumn<MT,SO>& column ) const;
73 
74  template< typename Arg >
75  inline void randomize( DenseColumn<MT,SO>& column, const Arg& min, const Arg& max ) const;
77  //**********************************************************************************************
78 };
80 //*************************************************************************************************
81 
82 
83 //*************************************************************************************************
90 template< typename MT // Type of the dense matrix
91  , bool SO > // Storage order
92 inline void Rand< DenseColumn<MT,SO> >::randomize( DenseColumn<MT,SO>& column ) const
93 {
94  using blaze::randomize;
95 
96  for( size_t i=0UL; i<column.size(); ++i ) {
97  randomize( column[i] );
98  }
99 }
101 //*************************************************************************************************
102 
103 
104 //*************************************************************************************************
113 template< typename MT // Type of the dense matrix
114  , bool SO > // Storage order
115 template< typename Arg > // Min/max argument type
116 inline void Rand< DenseColumn<MT,SO> >::randomize( DenseColumn<MT,SO>& column,
117  const Arg& min, const Arg& max ) const
118 {
119  using blaze::randomize;
120 
121  for( size_t i=0UL; i<column.size(); ++i ) {
122  randomize( column[i], min, max );
123  }
124 }
126 //*************************************************************************************************
127 
128 } // namespace blaze
129 
130 #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.
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 all restructuring row functions.