35 #ifndef _BLAZE_MATH_MATRIX_H_ 36 #define _BLAZE_MATH_MATRIX_H_ 62 template<
typename MT,
bool SO >
65 template<
typename MT,
bool SO >
68 template<
typename MT,
bool SO >
69 inline bool isUniform(
const Matrix<MT,SO>& m );
71 template<
typename MT,
bool SO >
72 inline bool isLower(
const Matrix<MT,SO>& m );
74 template<
typename MT,
bool SO >
75 inline bool isUniLower(
const Matrix<MT,SO>& m );
77 template<
typename MT,
bool SO >
80 template<
typename MT,
bool SO >
81 inline bool isUpper(
const Matrix<MT,SO>& m );
83 template<
typename MT,
bool SO >
84 inline bool isUniUpper(
const Matrix<MT,SO>& m );
86 template<
typename MT,
bool SO >
89 template<
typename MT,
bool SO >
90 inline bool isDiagonal(
const Matrix<MT,SO>& m );
92 template<
typename MT,
bool SO >
93 inline bool isIdentity(
const Matrix<MT,SO>& m );
95 template<
typename MT,
bool SO >
96 inline auto trace(
const Matrix<MT,SO>& m );
134 template<
typename MT
138 return isSymmetric<relaxed>( ~m );
178 template<
typename MT
182 return isHermitian<relaxed>( ~m );
220 template<
typename MT
224 return isUniform<relaxed>( ~m );
272 template<
typename MT
276 return isLower<relaxed>( ~m );
323 template<
typename MT
327 return isUniLower<relaxed>( ~m );
375 template<
typename MT
379 return isStrictlyLower<relaxed>( ~m );
427 template<
typename MT
431 return isUpper<relaxed>( ~m );
478 template<
typename MT
482 return isUniUpper<relaxed>( ~m );
530 template<
typename MT
534 return isStrictlyUpper<relaxed>( ~m );
583 template<
typename MT
587 return isDiagonal<relaxed>( ~m );
635 template<
typename MT
639 return isIdentity<relaxed>( ~m );
660 template<
typename MT
670 if( (~m).
rows() == 0UL ) {
674 ET tmp( (~m)(0UL,0UL) );
676 for(
size_t i=1UL; i<(~m).
rows(); ++i ) {
696 template<
typename MT,
bool SO >
697 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& m );
710 template<
typename MT
712 inline std::ostream& operator<<( std::ostream& os, const Matrix<MT,SO>& m )
716 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
718 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
719 os << std::setw(12) << tmp(i,j) <<
" ";
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for auxiliary alias declarations.
bool isLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower triangular matrix.
Definition: DenseMatrix.h:1214
bool isUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper triangular matrix.
Definition: DenseMatrix.h:1469
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1386
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1299
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:1725
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1827
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for the exception macros of the math module.
bool isUniform(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a uniform matrix.
Definition: DenseMatrix.h:1151
Header file for the Matrix base class.
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:1641
Header file for the relaxation flag types.
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:919
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:101
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:841
auto trace(const Matrix< MT, SO > &m)
Computes the trace of the given square matrix.
Definition: Matrix.h:662
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:490
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:1554
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:908