35 #ifndef _BLAZE_MATH_VIEWS_SUBMATRIX_H_
36 #define _BLAZE_MATH_VIEWS_SUBMATRIX_H_
164 template<
typename MT
166 inline SubmatrixExprTrait_<MT,unaligned>
171 return submatrix<unaligned>( ~matrix,
row,
column, m, n );
234 template<
typename MT
236 inline const SubmatrixExprTrait_<const MT,unaligned>
241 return submatrix<unaligned>( ~matrix,
row,
column, m, n );
264 template<
typename MT
266 inline SubmatrixExprTrait_<MT,unaligned>
271 return submatrix<unaligned>( ~matrix,
row,
column, m, n );
353 inline DisableIf_< Or< IsComputation<MT>, IsTransExpr<MT> >, SubmatrixExprTrait_<MT,AF> >
438 inline const DisableIf_< Or< IsComputation<MT>, IsTransExpr<MT> >, SubmatrixExprTrait_<const MT,AF> >
470 inline DisableIf_< Or< IsComputation<MT>, IsTransExpr<MT> >, SubmatrixExprTrait_<MT,AF> >
504 inline const EnableIf_< IsMatVecMultExpr<VT>, SubvectorExprTrait_<VT,AF> >
505 subvector(
const Vector<VT,TF>& vector,
size_t index,
size_t size )
509 typedef RemoveReference_< LeftOperand_<VT> > MT;
511 LeftOperand_<VT> left ( (~vector).leftOperand() );
512 RightOperand_<VT> right( (~vector).rightOperand() );
514 const size_t column( ( IsUpper<MT>::value )
515 ?( ( !AF && IsStrictlyUpper<MT>::value )?( index + 1UL ):( index ) )
517 const size_t n( ( IsLower<MT>::value )
518 ?( ( IsUpper<MT>::value )?( size )
519 :( ( IsStrictlyLower<MT>::value && size > 0UL )
520 ?( index + size - 1UL )
521 :( index + size ) ) )
522 :( ( IsUpper<MT>::value )?( left.columns() -
column )
523 :( left.columns() ) ) );
525 return submatrix<AF>( left, index,
column,
size, n ) * subvector<AF>( right, column, n );
547 inline const EnableIf_< IsTVecMatMultExpr<VT>, SubvectorExprTrait_<VT,AF> >
548 subvector(
const Vector<VT,TF>& vector,
size_t index,
size_t size )
552 typedef RemoveReference_< RightOperand_<VT> > MT;
554 LeftOperand_<VT> left ( (~vector).leftOperand() );
555 RightOperand_<VT> right( (~vector).rightOperand() );
557 const size_t row( ( IsLower<MT>::value )
558 ?( ( !AF && IsStrictlyLower<MT>::value )?( index + 1UL ):( index ) )
560 const size_t m( ( IsUpper<MT>::value )
561 ?( ( IsLower<MT>::value )?( size )
562 :( ( IsStrictlyUpper<MT>::value && size > 0UL )
563 ?( index + size - 1UL )
564 :( index + size ) ) )
565 :( ( IsLower<MT>::value )?( right.rows() -
row )
566 :( right.rows() ) ) );
568 return subvector<AF>( left,
row, m ) * submatrix<AF>( right, row, index, m, size );
592 inline const EnableIf_< IsMatMatAddExpr<MT>, SubmatrixExprTrait_<MT,AF> >
593 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
597 return submatrix<AF>( (~matrix).leftOperand() ,
row,
column, m, n ) +
598 submatrix<AF>( (~matrix).rightOperand(),
row,
column, m, n );
622 inline const EnableIf_< IsMatMatSubExpr<MT>, SubmatrixExprTrait_<MT,AF> >
623 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
627 return submatrix<AF>( (~matrix).leftOperand() ,
row,
column, m, n ) -
628 submatrix<AF>( (~matrix).rightOperand(),
row,
column, m, n );
652 inline const EnableIf_< IsMatMatMultExpr<MT>, SubmatrixExprTrait_<MT,AF> >
653 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
657 typedef RemoveReference_< LeftOperand_<MT> > MT1;
658 typedef RemoveReference_< RightOperand_<MT> > MT2;
660 LeftOperand_<MT> left ( (~matrix).leftOperand() );
661 RightOperand_<MT> right( (~matrix).rightOperand() );
663 const size_t begin(
max( ( IsUpper<MT1>::value )
664 ?( ( !AF && IsStrictlyUpper<MT1>::value )?( row + 1UL ):( row ) )
666 , ( IsLower<MT2>::value )
667 ?( ( !AF && IsStrictlyLower<MT2>::value )?( column + 1UL ):( column ) )
669 const size_t end(
min( ( IsLower<MT1>::value )
670 ?( ( IsStrictlyLower<MT1>::value && m > 0UL )?( row + m - 1UL ):( row + m ) )
672 , ( IsUpper<MT2>::value )
673 ?( ( IsStrictlyUpper<MT2>::value && n > 0UL )?( column + n - 1UL ):( column + n ) )
674 :( left.columns() ) ) );
678 return submatrix<AF>( left,
row,
begin, m, diff ) *
679 submatrix<AF>( right, begin, column, diff, n );
703 inline const EnableIf_< IsVecTVecMultExpr<MT>, SubmatrixExprTrait_<MT,AF> >
704 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
708 return subvector<AF>( (~matrix).leftOperand(),
row, m ) *
709 subvector<AF>( (~matrix).rightOperand(),
column, n );
733 inline const EnableIf_< IsMatScalarMultExpr<MT>, SubmatrixExprTrait_<MT,AF> >
734 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
738 return submatrix<AF>( (~matrix).leftOperand(),
row,
column, m, n ) * (~matrix).rightOperand();
762 inline const EnableIf_< IsMatScalarDivExpr<MT>, SubmatrixExprTrait_<MT,AF> >
763 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
767 return submatrix<AF>( (~matrix).leftOperand(),
row,
column, m, n ) / (~matrix).rightOperand();
791 inline const EnableIf_< IsMatForEachExpr<MT>, SubmatrixExprTrait_<MT,AF> >
792 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
796 return forEach( submatrix<AF>( (~matrix).operand(), row, column, m, n ), (~matrix).operation() );
820 inline const EnableIf_< IsMatEvalExpr<MT>, SubmatrixExprTrait_<MT,AF> >
821 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
825 return eval( submatrix<AF>( (~matrix).operand(), row, column, m, n ) );
849 inline const EnableIf_< IsMatSerialExpr<MT>, SubmatrixExprTrait_<MT,AF> >
850 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
854 return serial( submatrix<AF>( (~matrix).operand(), row, column, m, n ) );
878 inline const EnableIf_< IsMatTransExpr<MT>, SubmatrixExprTrait_<MT,AF> >
879 submatrix(
const Matrix<MT,SO>& matrix,
size_t row,
size_t column,
size_t m,
size_t n )
883 return trans( submatrix<AF>( (~matrix).operand(), column, row, n, m ) );
908 inline const Submatrix<MT,AF1,SO,DF>
909 submatrix(
const Submatrix<MT,AF2,SO,DF>& sm,
size_t row,
size_t column,
size_t m,
size_t n )
913 if( ( row + m > sm.rows() ) || ( column + n > sm.columns() ) ) {
917 return Submatrix<MT,AF1,SO,DF>( sm.matrix_, sm.row_ +
row, sm.column_ +
column, m, n );
934 template<
typename MT,
bool AF,
bool SO,
bool DF >
935 inline void reset( Submatrix<MT,AF,SO,DF>& sm );
937 template<
typename MT,
bool AF,
bool SO,
bool DF >
938 inline void reset( Submatrix<MT,AF,SO,DF>& sm,
size_t i );
940 template<
typename MT,
bool AF,
bool SO,
bool DF >
941 inline void clear( Submatrix<MT,AF,SO,DF>& sm );
943 template<
typename MT,
bool AF,
bool SO,
bool DF >
944 inline bool isDefault(
const Submatrix<MT,AF,SO,DF>& sm );
946 template<
typename MT,
bool AF,
bool SO,
bool DF >
947 inline bool isIntact(
const Submatrix<MT,AF,SO,DF>& sm ) noexcept;
949 template<
typename MT,
bool AF,
bool SO,
bool DF >
950 inline bool isSymmetric(
const Submatrix<MT,AF,SO,DF>& sm );
952 template<
typename MT,
bool AF,
bool SO,
bool DF >
953 inline bool isHermitian(
const Submatrix<MT,AF,SO,DF>& sm );
955 template<
typename MT,
bool AF,
bool SO,
bool DF >
956 inline bool isLower(
const Submatrix<MT,AF,SO,DF>& sm );
958 template<
typename MT,
bool AF,
bool SO,
bool DF >
959 inline bool isUniLower(
const Submatrix<MT,AF,SO,DF>& sm );
961 template<
typename MT,
bool AF,
bool SO,
bool DF >
964 template<
typename MT,
bool AF,
bool SO,
bool DF >
965 inline bool isUpper(
const Submatrix<MT,AF,SO,DF>& sm );
967 template<
typename MT,
bool AF,
bool SO,
bool DF >
968 inline bool isUniUpper(
const Submatrix<MT,AF,SO,DF>& sm );
970 template<
typename MT,
bool AF,
bool SO,
bool DF >
973 template<
typename MT,
bool AF,
bool SO,
bool DF >
974 inline bool isSame(
const Submatrix<MT,AF,SO,DF>& a,
const Matrix<MT,SO>& b ) noexcept;
976 template<
typename MT,
bool AF,
bool SO,
bool DF >
977 inline bool isSame(
const Matrix<MT,SO>& a,
const Submatrix<MT,AF,SO,DF>& b ) noexcept;
979 template<
typename MT,
bool AF,
bool SO,
bool DF >
980 inline bool isSame(
const Submatrix<MT,AF,SO,DF>& a,
const Submatrix<MT,AF,SO,DF>& b ) noexcept;
992 template<
typename MT
1016 template<
typename MT
1036 template<
typename MT
1065 template<
typename MT
1074 for(
size_t i=0UL; i<(~sm).
rows(); ++i )
1075 for(
size_t j=0UL; j<(~sm).
columns(); ++j )
1080 for(
size_t j=0UL; j<(~sm).
columns(); ++j )
1081 for(
size_t i=0UL; i<(~sm).
rows(); ++i )
1110 template<
typename MT
1113 inline bool isDefault(
const Submatrix<MT,AF,SO,false>& sm )
1117 typedef ConstIterator_< Submatrix<MT,AF,SO,false> >
ConstIterator;
1119 const size_t iend( ( SO ==
rowMajor)?( sm.rows() ):( sm.columns() ) );
1121 for(
size_t i=0UL; i<iend; ++i ) {
1122 for( ConstIterator element=sm.begin(i); element!=sm.end(i); ++element )
1123 if( !
isDefault( element->value() ) )
return false;
1150 template<
typename MT
1156 return ( sm.row_ + sm.m_ <= sm.matrix_.rows() &&
1157 sm.column_ + sm.n_ <= sm.matrix_.columns() &&
1185 template<
typename MT
1195 else return isSymmetric( static_cast<const BaseType&>( sm ) );
1222 template<
typename MT
1232 else return isHermitian( static_cast<const BaseType&>( sm ) );
1269 template<
typename MT
1279 else return isLower( static_cast<const BaseType&>( sm ) );
1315 template<
typename MT
1325 else return isUniLower( static_cast<const BaseType&>( sm ) );
1361 template<
typename MT
1408 template<
typename MT
1418 else return isUpper( static_cast<const BaseType&>( sm ) );
1454 template<
typename MT
1464 else return isUniUpper( static_cast<const BaseType&>( sm ) );
1500 template<
typename MT
1527 template<
typename MT
1533 return (
isSame( a.matrix_, ~b ) && ( a.rows() == (~b).
rows() ) && ( a.columns() == (~b).
columns() ) );
1550 template<
typename MT
1556 return (
isSame( ~a, b.matrix_ ) && ( (~a).rows() == b.rows() ) && ( (~a).columns() == b.columns() ) );
1573 template<
typename MT
1579 return (
isSame( a.matrix_, b.matrix_ ) &&
1580 ( a.row_ == b.row_ ) && ( a.column_ == b.column_ ) &&
1581 ( a.m_ == b.m_ ) && ( a.n_ == b.n_ ) );
1623 inline DisableIf_< HasMutableDataAccess<MT> >
invert( Submatrix<MT,AF,SO,true>& sm )
1625 typedef ResultType_< Submatrix<MT,AF,SO,true> > RT;
1654 template<
typename MT
1660 inline bool tryAssign(
const Submatrix<MT,AF,SO,DF>& lhs,
const Vector<VT,TF>& rhs,
1661 size_t row,
size_t column )
1668 return tryAssign( lhs.matrix_, ~rhs, lhs.row_ + row, lhs.column_ + column );
1690 template<
typename MT1
1696 inline bool tryAssign(
const Submatrix<MT1,AF,SO1,DF>& lhs,
const Matrix<MT2,SO2>& rhs,
1697 size_t row,
size_t column )
1704 return tryAssign( lhs.matrix_, ~rhs, lhs.row_ + row, lhs.column_ + column );
1726 template<
typename MT
1732 inline bool tryAddAssign(
const Submatrix<MT,AF,SO,DF>& lhs,
const Vector<VT,TF>& rhs,
1733 size_t row,
size_t column )
1740 return tryAddAssign( lhs.matrix_, ~rhs, lhs.row_ + row, lhs.column_ + column );
1762 template<
typename MT1
1768 inline bool tryAddAssign(
const Submatrix<MT1,AF,SO1,DF>& lhs,
const Matrix<MT2,SO2>& rhs,
1769 size_t row,
size_t column )
1776 return tryAddAssign( lhs.matrix_, ~rhs, lhs.row_ + row, lhs.column_ + column );
1798 template<
typename MT
1804 inline bool trySubAssign(
const Submatrix<MT,AF,SO,DF>& lhs,
const Vector<VT,TF>& rhs,
1805 size_t row,
size_t column )
1812 return trySubAssign( lhs.matrix_, ~rhs, lhs.row_ + row, lhs.column_ + column );
1834 template<
typename MT1
1840 inline bool trySubAssign(
const Submatrix<MT1,AF,SO1,DF>& lhs,
const Matrix<MT2,SO2>& rhs,
1841 size_t row,
size_t column )
1848 return trySubAssign( lhs.matrix_, ~rhs, lhs.row_ + row, lhs.column_ + column );
1870 template<
typename MT
1876 inline bool tryMultAssign(
const Submatrix<MT,AF,SO,DF>& lhs,
const Vector<VT,TF>& rhs,
1877 size_t row,
size_t column )
1884 return tryMultAssign( lhs.matrix_, ~rhs, lhs.row_ + row, lhs.column_ + column );
1905 template<
typename MT
1909 inline DerestrictTrait_< Submatrix<MT,AF,SO,DF> > derestrict( Submatrix<MT,AF,SO,DF>& dm )
1911 typedef DerestrictTrait_< Submatrix<MT,AF,SO,DF> >
ReturnType;
1912 return ReturnType( derestrict( dm.matrix_ ), dm.row_, dm.column_, dm.m_, dm.n_ );
1928 template<
typename MT,
bool AF,
bool SO,
bool DF >
1929 struct IsRestricted< Submatrix<MT,AF,SO,DF> >
1946 template<
typename MT,
bool AF,
bool SO,
bool DF >
1947 struct DerestrictTrait< Submatrix<MT,AF,SO,DF> >
1949 using Type = Submatrix< RemoveReference_< DerestrictTrait_<MT> >, AF >;
1965 template<
typename MT,
bool AF,
bool SO >
1966 struct HasConstDataAccess< Submatrix<MT,AF,SO,true> >
1983 template<
typename MT,
bool AF,
bool SO >
1984 struct HasMutableDataAccess< Submatrix<MT,AF,SO,true> >
1985 :
public BoolConstant< HasMutableDataAccess<MT>::value >
2001 template<
typename MT,
bool SO >
2018 template<
typename MT,
bool AF,
bool SO,
bool DF,
typename T >
2019 struct AddTrait< Submatrix<MT,AF,SO,DF>, T >
2021 using Type = AddTrait_< SubmatrixTrait_<MT>, T >;
2024 template<
typename T,
typename MT,
bool AF,
bool SO,
bool DF >
2025 struct AddTrait< T, Submatrix<MT,AF,SO,DF> >
2027 using Type = AddTrait_< T, SubmatrixTrait_<MT> >;
2043 template<
typename MT,
bool AF,
bool SO,
bool DF,
typename T >
2044 struct SubTrait< Submatrix<MT,AF,SO,DF>, T >
2046 using Type = SubTrait_< SubmatrixTrait_<MT>, T >;
2049 template<
typename T,
typename MT,
bool AF,
bool SO,
bool DF >
2050 struct SubTrait< T, Submatrix<MT,AF,SO,DF> >
2052 using Type = SubTrait_< T, SubmatrixTrait_<MT> >;
2068 template<
typename MT,
bool AF,
bool SO,
bool DF,
typename T >
2069 struct MultTrait< Submatrix<MT,AF,SO,DF>, T >
2071 using Type = MultTrait_< SubmatrixTrait_<MT>, T >;
2074 template<
typename T,
typename MT,
bool AF,
bool SO,
bool DF >
2075 struct MultTrait< T, Submatrix<MT,AF,SO,DF> >
2077 using Type = MultTrait_< T, SubmatrixTrait_<MT> >;
2093 template<
typename MT,
bool AF,
bool SO,
bool DF,
typename T >
2094 struct DivTrait< Submatrix<MT,AF,SO,DF>, T >
2096 using Type = DivTrait_< SubmatrixTrait_<MT>, T >;
2099 template<
typename T,
typename MT,
bool AF,
bool DF,
bool SO >
2100 struct DivTrait< T, Submatrix<MT,AF,SO,DF> >
2102 using Type = DivTrait_< T, SubmatrixTrait_<MT> >;
2118 template<
typename MT,
bool AF,
bool SO,
bool DF >
2119 struct SubmatrixTrait< Submatrix<MT,AF,SO,DF> >
2121 using Type = SubmatrixTrait_< ResultType_< Submatrix<MT,AF,SO,DF> > >;
2137 template<
typename MT,
bool AF1,
bool SO,
bool DF,
bool AF2 >
2138 struct SubmatrixExprTrait< Submatrix<MT,AF1,SO,DF>, AF2 >
2140 using Type = Submatrix<MT,AF2,SO,DF>;
2148 template<
typename MT,
bool AF1,
bool SO,
bool DF,
bool AF2 >
2149 struct SubmatrixExprTrait< const Submatrix<MT,AF1,SO,DF>, AF2 >
2151 using Type = Submatrix<MT,AF2,SO,DF>;
2159 template<
typename MT,
bool AF1,
bool SO,
bool DF,
bool AF2 >
2160 struct SubmatrixExprTrait< volatile Submatrix<MT,AF1,SO,DF>, AF2 >
2162 using Type = Submatrix<MT,AF2,SO,DF>;
2170 template<
typename MT,
bool AF1,
bool SO,
bool DF,
bool AF2 >
2171 struct SubmatrixExprTrait< const volatile Submatrix<MT,AF1,SO,DF>, AF2 >
2173 using Type = Submatrix<MT,AF2,SO,DF>;
2189 template<
typename MT,
bool AF,
bool SO,
bool DF >
2190 struct RowTrait< Submatrix<MT,AF,SO,DF> >
2192 using Type = RowTrait_< ResultType_< Submatrix<MT,AF,SO,DF> > >;
2208 template<
typename MT,
bool AF,
bool SO,
bool DF >
2209 struct ColumnTrait< Submatrix<MT,AF,SO,DF> >
2211 using Type = ColumnTrait_< ResultType_< Submatrix<MT,AF,SO,DF> > >;
typename SubmatrixExprTrait< MT, AF >::Type SubmatrixExprTrait_
Auxiliary alias declaration for the SubmatrixExprTrait type trait.The SubmatrixExprTrait_ alias decla...
Definition: SubmatrixExprTrait.h:133
#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.
Header file for mathematical functions.
Header file for the alignment flag values.
Header file for the subtraction trait.
#define BLAZE_CONSTRAINT_MUST_HAVE_MUTABLE_DATA_ACCESS(T)
Constraint on the data type.In case the given data type T does not provide low-level data access to m...
Definition: MutableDataAccess.h:61
BLAZE_ALWAYS_INLINE bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:653
Header file for basic type definitions.
Header file for the IsTVecMatMultExpr type trait class.
Header file for the row trait.
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1192
Header file for the serial shim.
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:1423
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
const bool aligned
Alignment flag for aligned vectors and matrices.Via this flag it is possible to specify subvectors...
Definition: AlignmentFlag.h:85
Header file for the dense matrix inversion flags.
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:689
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:188
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1669
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Header file for the IsTransExpr type trait class.
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:723
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Header file for the IsMatVecMultExpr type trait class.
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1716
Header file for the IsMatMatAddExpr type trait class.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:126
bool isLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower triangular matrix.
Definition: DenseMatrix.h:1036
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:109
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Header file for the IsMatTransExpr type trait class.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:741
Submatrix specialization for dense matrices.
SubvectorExprTrait_< VT, unaligned > subvector(Vector< VT, TF > &vector, size_t index, size_t size)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:152
Header file for the implementation of the Subvector view.
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Header file for the DisableIf class template.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsVecTVecMultExpr type trait class.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
Header file for the Or class template.
Header file for the IsMatMatMultExpr type trait class.
Header file for the implementation of the Submatrix base template.
const DMatForEachExpr< MT, OP, SO > forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1046
Header file for the IsMatSerialExpr type trait class.
Header file for the IsMatScalarMultExpr type trait class.
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:330
bool isUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper triangular matrix.
Definition: DenseMatrix.h:1267
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
Header file for the IsMatEvalExpr type trait class.
Submatrix specialization for sparse matrices.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1113
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:254
Constraint on the data type.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
View on a specific submatrix of a dense or sparse matrix.The Submatrix class template represents a vi...
Definition: Forward.h:49
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
Header file for the DerestrictTrait class template.
Header file for the HasConstDataAccess type trait.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:126
Header file for the Matrix base class.
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2642
Header file for the IsMatScalarDivExpr type trait class.
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Header file for the column trait.
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:89
Header file for the HasMutableDataAccess type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
const DMatEvalExpr< MT, SO > eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:705
Header file for the IsMatMatSubExpr type trait class.
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
Header file for the RemoveReference type trait.
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:950
const bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
Header file for the IsComputation type trait class.
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:759
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
Header file for the IntegralConstant class template.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:240
Header file for the SubvectorExprTrait class template.
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:1344
Header file for the IsUpper type trait.
SubmatrixExprTrait_< MT, unaligned > submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:167
Header file for the IsRestricted type trait.
Header file for the IsMatForEachExpr type trait class.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the TrueType type/value trait base class.
typename T::BaseType BaseType_
Alias declaration for nested BaseType type definitions.The BaseType_ alias declaration provides a con...
Definition: Aliases.h:63
Header file for the FunctionTrace class.