35#ifndef _BLAZE_MATH_CUSTOMMATRIX_H_
36#define _BLAZE_MATH_CUSTOMMATRIX_H_
74template<
typename Type
89 inline void randomize( CustomMatrix<Type,AF,PF,SO,Tag,RT>& matrix )
const
93 const size_t m( matrix.rows() );
94 const size_t n( matrix.columns() );
96 for(
size_t i=0UL; i<m; ++i ) {
97 for(
size_t j=0UL; j<n; ++j ) {
112 template<
typename Arg >
113 inline void randomize( CustomMatrix<Type,AF,PF,SO,Tag,RT>& matrix,
114 const Arg&
min,
const Arg&
max )
const
118 const size_t m( matrix.rows() );
119 const size_t n( matrix.columns() );
121 for(
size_t i=0UL; i<m; ++i ) {
122 for(
size_t j=0UL; j<n; ++j ) {
149template<
typename Type
163 const size_t n( matrix.rows() );
165 for(
size_t i=0UL; i<n; ++i ) {
166 for(
size_t j=0UL; j<i; ++j ) {
168 matrix(j,i) = matrix(i,j);
189template<
typename Type
204 const size_t n( matrix.rows() );
206 for(
size_t i=0UL; i<n; ++i ) {
207 for(
size_t j=0UL; j<i; ++j ) {
209 matrix(j,i) = matrix(i,j);
228template<
typename Type
246 const size_t n( matrix.rows() );
248 for(
size_t i=0UL; i<n; ++i ) {
249 for(
size_t j=0UL; j<i; ++j ) {
251 matrix(j,i) =
conj( matrix(i,j) );
272template<
typename Type
291 const size_t n( matrix.rows() );
293 for(
size_t i=0UL; i<n; ++i ) {
294 for(
size_t j=0UL; j<i; ++j ) {
296 matrix(j,i) =
conj( matrix(i,j) );
315template<
typename Type
331 const size_t n( matrix.rows() );
334 matrix *=
ctrans( matrix );
336 for(
size_t i=0UL; i<n; ++i ) {
337 matrix(i,i) +=
Type(n);
Header file for the alignment flag enumeration.
Header file for run time assertion macros.
Header file for the conjugate shim.
Header file for all basic DenseMatrix functionality.
Header file for the complete DynamicVector implementation.
Header file for the complete IdentityMatrix implementation.
Constraint on the data type.
Header file for the UnderlyingBuiltin type trait.
Header file for the complete ZeroMatrix implementation.
Efficient implementation of a customizable matrix.
Definition CustomMatrix.h:423
Default implementation of the Rand class.
Definition Random.h:230
Header file for the implementation of a customizable matrix.
Header file for the implementation of a dynamic MxN matrix.
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1339
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1375
decltype(auto) real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition DMatMapExpr.h:1529
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition DMatMapExpr.h:1464
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition DMatMapExpr.h:1501
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition DenseMatrix.h:1534
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition DenseMatrix.h:1456
#define BLAZE_CONSTRAINT_MUST_BE_SCALAR_TYPE(T)
Constraint on the data type.
Definition Scalar.h:61
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_t
Auxiliary alias declaration for the UnderlyingBuiltin type trait.
Definition UnderlyingBuiltin.h:117
PaddingFlag
Padding flag for (un-)padded vectors and matrices.
Definition PaddingFlag.h:77
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.
Definition AlignmentFlag.h:63
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition Matrix.h:1383
T rand()
Random number function.
Definition Random.h:583
void randomize(T &&value)
Randomization of a given variable.
Definition Random.h:626
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
Header file for the exception macros of the math module.
Header file for the real shim.
Generic wrapper for the arg() function.
Definition Arg.h:77
Implementation of a random number generator.