35#ifndef _BLAZE_MATH_MATRIX_H_
36#define _BLAZE_MATH_MATRIX_H_
70template<
typename MT,
bool SO >
73template<
typename MT,
bool SO >
76template<
typename MT,
bool SO >
79template<
typename MT,
bool SO >
80bool isLower(
const Matrix<MT,SO>& m );
82template<
typename MT,
bool SO >
85template<
typename MT,
bool SO >
88template<
typename MT,
bool SO >
89bool isUpper(
const Matrix<MT,SO>& m );
91template<
typename MT,
bool SO >
94template<
typename MT,
bool SO >
97template<
typename MT,
bool SO >
100template<
typename MT,
bool SO >
103template<
typename MT,
bool SO >
104decltype(
auto)
pow2(
const Matrix<MT,SO>& m );
106template<
typename MT,
bool SO >
107decltype(
auto)
pow3(
const Matrix<MT,SO>& m );
109template<
typename MT,
bool SO >
110decltype(
auto)
pow4(
const Matrix<MT,SO>& m );
112template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
113decltype(
auto)
schur(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs );
115template<
typename MT,
bool SO >
116auto trace(
const Matrix<MT,SO>& m );
118template<
bool RF,
typename MT >
119decltype(
auto)
reverse( MT&& m );
161 return isSymmetric<relaxed>( *m );
205 return isHermitian<relaxed>( *m );
247 return isUniform<relaxed>( *m );
299 return isLower<relaxed>( *m );
350 return isUniLower<relaxed>( *m );
402 return isStrictlyLower<relaxed>( *m );
454 return isUpper<relaxed>( *m );
505 return isUniUpper<relaxed>( *m );
557 return isStrictlyUpper<relaxed>( *m );
610 return isDiagonal<relaxed>( *m );
662 return isIdentity<relaxed>( *m );
714 return (*m) % (*m) % (*m);
764template<
typename MT1
770 return (*lhs) % (*rhs);
813 , EnableIf_t< RF == rowwise >* =
nullptr >
814inline decltype(
auto) reverse_backend( MT&& m )
816 return rows( std::forward<MT>( m ), [
max=m.rows()-1UL](
size_t i ){ return max - i; }, m.rows() );
832 , EnableIf_t< RF == columnwise >* =
nullptr >
833inline decltype(
auto) reverse_backend( MT&& m )
835 return columns( std::forward<MT>( m ), [
max=m.columns()-1UL](
size_t i ){ return max - i; }, m.columns() );
880 return reverse_backend<RF>( std::forward<MT>( m ) );
896template<
typename MT,
bool SO >
897std::ostream&
operator<<( std::ostream& os,
const Matrix<MT,SO>& m );
916 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
918 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
919 os << std::setw(12) << tmp(i,j) <<
" ";
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
Header file for the EnableIf class template.
Header file for the reduction flags.
Base class for matrices.
Definition: Matrix.h:85
Header file for the Matrix base class.
decltype(auto) diagonal(Matrix< MT, SO > &matrix, RDAs... args)
Creating a view on the diagonal of the given matrix.
Definition: Band.h:380
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) sum(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of addition.
Definition: DMatReduceExpr.h:2156
bool isUniLower(const Matrix< MT, SO > &m)
Checks if the given matrix is a lower unitriangular matrix.
Definition: Matrix.h:348
bool isHermitian(const Matrix< MT, SO > &m)
Checks if the given matrix is Hermitian.
Definition: Matrix.h:203
BLAZE_ALWAYS_INLINE constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:644
bool isSymmetric(const Matrix< MT, SO > &m)
Checks if the given matrix is symmetric.
Definition: Matrix.h:159
bool isLower(const Matrix< MT, SO > &m)
Checks if the given matrix is a lower triangular matrix.
Definition: Matrix.h:297
bool isUniform(const Matrix< MT, SO > &m)
Checks if the given matrix is a uniform matrix.
Definition: Matrix.h:245
decltype(auto) schur(const Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Schur product of two matrices ( ).
Definition: Matrix.h:768
decltype(auto) pow2(const Matrix< MT, SO > &m)
Computes the square for each single element of the matrix m.
Definition: Matrix.h:686
bool isDiagonal(const Matrix< MT, SO > &m)
Checks if the give matrix is diagonal.
Definition: Matrix.h:608
BLAZE_ALWAYS_INLINE constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:660
bool isIdentity(const Matrix< MT, SO > &m)
Checks if the give matrix is an identity matrix.
Definition: Matrix.h:660
bool isStrictlyLower(const Matrix< MT, SO > &m)
Checks if the given matrix is a strictly lower triangular matrix.
Definition: Matrix.h:400
bool isUniUpper(const Matrix< MT, SO > &m)
Checks if the given matrix is an upper unitriangular matrix.
Definition: Matrix.h:503
std::ostream & operator<<(std::ostream &os, const Matrix< MT, SO > &m)
Global output operator for dense and sparse matrices.
Definition: Matrix.h:912
decltype(auto) pow3(const Matrix< MT, SO > &m)
Computes the cube for each single element of the matrix m.
Definition: Matrix.h:712
bool isStrictlyUpper(const Matrix< MT, SO > &m)
Checks if the given matrix is a strictly upper triangular matrix.
Definition: Matrix.h:555
decltype(auto) reverse(MT &&m)
Reverse the rows or columns of a matrix.
Definition: Matrix.h:878
auto trace(const Matrix< MT, SO > &m)
Computes the trace of the given square matrix.
Definition: Matrix.h:792
bool isUpper(const Matrix< MT, SO > &m)
Checks if the given matrix is an upper triangular matrix.
Definition: Matrix.h:452
decltype(auto) pow4(const Matrix< MT, SO > &m)
Computes the quadruple for each single element of the matrix m.
Definition: Matrix.h:738
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:1383
#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 add shim.
Header file for the div shim.
Header file for the mult shim.
Header file for the sub shim.
Header file for the implementation of the Band view.
Header file for the implementation of the Elements view.