35 #ifndef _BLAZE_MATH_VIEWS_SUBMATRIX_H_ 36 #define _BLAZE_MATH_VIEWS_SUBMATRIX_H_ 182 return submatrix<unaligned,I,J,M,N>( ~matrix, args... );
251 return submatrix<unaligned,I,J,M,N>( ~matrix, args... );
282 return submatrix<unaligned,I,J,M,N>( std::move( ~matrix ), args... );
365 using ReturnType = Submatrix_<MT,AF,I,J,M,N>;
366 return ReturnType( ~matrix, args... );
447 using ReturnType =
const Submatrix_<const MT,AF,I,J,M,N>;
448 return ReturnType( ~matrix, args... );
481 using ReturnType = Submatrix_<MT,AF,I,J,M,N>;
482 return ReturnType( ~matrix, args... );
545 template<
typename MT
548 inline decltype(
auto)
553 return submatrix<unaligned>( ~matrix,
row,
column, m, n, args... );
615 template<
typename MT
618 inline decltype(
auto)
623 return submatrix<unaligned>( ~matrix,
row,
column, m, n, args... );
647 template<
typename MT
650 inline decltype(
auto)
655 return submatrix<unaligned>( std::move( ~matrix ),
row,
column, m, n, args... );
734 inline decltype(
auto)
739 using ReturnType = Submatrix_<MT,AF>;
740 return ReturnType( ~matrix,
row,
column, m, n, args... );
817 inline decltype(
auto)
822 using ReturnType =
const Submatrix_<const MT,AF>;
823 return ReturnType( ~matrix,
row,
column, m, n, args... );
852 inline decltype(
auto)
857 using ReturnType = Submatrix_<MT,AF>;
858 return ReturnType( ~matrix,
row,
column, m, n, args... );
887 inline decltype(
auto)
submatrix( const MatMatAddExpr<MT>& matrix, RSAs... args )
891 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) +
892 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... );
914 inline decltype(
auto)
submatrix( const MatMatSubExpr<MT>& matrix, RSAs... args )
918 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) -
919 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... );
941 inline decltype(
auto)
submatrix( const SchurExpr<MT>& matrix, RSAs... args )
945 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) %
946 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... );
968 inline decltype(
auto)
submatrix( const MatMatMultExpr<MT>& matrix, RSAs... args )
972 using MT1 = RemoveReference_t< LeftOperand_t< MatrixType_t<MT> > >;
973 using MT2 = RemoveReference_t< RightOperand_t< MatrixType_t<MT> > >;
975 const SubmatrixData<CSAs...> sd( args... );
977 decltype(
auto) left ( (~matrix).leftOperand() );
978 decltype(auto) right( (~matrix).rightOperand() );
992 ?( sd.
row() + sd.
rows() - 1UL )
1028 , typename... RSAs >
1029 inline decltype(auto)
submatrix( const MatMatKronExpr<MT>& matrix, RSAs... args )
1033 return columns(
rows( ~matrix, make_shifted_index_sequence<I,M>(), args... )
1034 , make_shifted_index_sequence<J,N>(), args... );
1058 ,
typename... RSAs >
1059 inline decltype(
auto)
1060 submatrix( const MatMatKronExpr<MT>& matrix,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1065 , [
column](
size_t i ){
return i+
column; }, n, args... );
1088 ,
typename... RSAs >
1089 inline decltype(
auto)
submatrix( const VecTVecMultExpr<MT>& matrix, RSAs... args )
1093 return subvector<AF,I,M>( (~matrix).leftOperand(), args... ) *
1094 subvector<AF,J,N>( (~matrix).rightOperand(), args... );
1117 ,
typename... RSAs >
1118 inline decltype(
auto)
1119 submatrix( const VecTVecMultExpr<MT>& matrix,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1123 return subvector<AF>( (~matrix).leftOperand(),
row, m, args... ) *
1124 subvector<AF>( (~matrix).rightOperand(),
column, n, args... );
1145 ,
typename... RSAs >
1146 inline decltype(
auto)
submatrix( const MatScalarMultExpr<MT>& matrix, RSAs... args )
1150 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) * (~matrix).rightOperand();
1171 ,
typename... RSAs >
1172 inline decltype(
auto)
submatrix( const MatScalarDivExpr<MT>& matrix, RSAs... args )
1176 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) / (~matrix).rightOperand();
1197 ,
typename... RSAs >
1198 inline decltype(
auto)
submatrix( const MatMapExpr<MT>& matrix, RSAs... args )
1202 return map( submatrix<AF,CSAs...>( (~matrix).operand(), args... ), (~matrix).operation() );
1223 ,
typename... RSAs >
1224 inline decltype(
auto)
submatrix( const MatMatMapExpr<MT>& matrix, RSAs... args )
1228 return map( submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ),
1229 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... ),
1230 (~matrix).operation() );
1251 ,
typename... RSAs >
1252 inline decltype(
auto)
submatrix( const MatEvalExpr<MT>& matrix, RSAs... args )
1256 return eval( submatrix<AF,CSAs...>( (~matrix).operand(), args... ) );
1277 ,
typename... RSAs >
1278 inline decltype(
auto)
submatrix( const MatSerialExpr<MT>& matrix, RSAs... args )
1282 return serial( submatrix<AF,CSAs...>( (~matrix).operand(), args... ) );
1303 ,
typename... RSAs >
1304 inline decltype(
auto)
submatrix( const DeclExpr<MT>& matrix, RSAs... args )
1308 return submatrix<AF,CSAs...>( (~matrix).operand(), args... );
1332 ,
typename... RSAs >
1333 inline decltype(
auto)
submatrix( const MatTransExpr<MT>& matrix, RSAs... args )
1337 return trans( submatrix<AF,J,I,N,M>( (~matrix).operand(), args... ) );
1361 ,
typename... RSAs >
1362 inline decltype(
auto)
1363 submatrix( const MatTransExpr<MT>& matrix,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1367 return trans( submatrix<AF>( (~matrix).operand(),
column,
row, n, m, args... ) );
1392 ,
typename... RSAs >
1393 inline decltype(
auto)
submatrix( const VecExpandExpr<MT,CEAs...>& matrix, RSAs... args )
1399 constexpr
bool TF( TransposeFlag_v<VT> );
1401 constexpr
size_t index ( TF ? J : I );
1402 constexpr
size_t size ( TF ? N : M );
1403 constexpr
size_t expansion( TF ? M : N );
1405 return expand<expansion>( subvector<index,size>( (~matrix).operand(), args... ) );
1430 ,
typename... RSAs >
1431 inline decltype(
auto)
1432 submatrix( const VecExpandExpr<MT,CEAs...>& matrix,
1433 size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1439 constexpr
bool TF( TransposeFlag_v<VT> );
1441 const size_t index ( TF ?
column :
row );
1442 const size_t size ( TF ? n : m );
1443 const size_t expansion( TF ? m : n );
1477 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
1478 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
1479 inline decltype(
auto)
submatrix( MT&& sm, RSAs... args )
1491 return submatrix<AF,I+I2,J+J2,M,N>( sm.operand(), args... );
1516 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
1517 inline decltype(
auto)
submatrix( MT&& sm, RSAs... args )
1524 if( ( I + M > sm.rows() ) || ( J + N > sm.columns() ) ) {
1533 return submatrix<AF>( sm.operand(), sm.row() + I, sm.column() + J, M, N, args... );
1558 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
1559 inline decltype(
auto)
submatrix( MT&& sm,
size_t row,
size_t column,
size_t m,
size_t n, RSAs... args )
1566 if( (
row + m > sm.rows() ) || (
column + n > sm.columns() ) ) {
1575 return submatrix<AF>( sm.operand(), sm.row() +
row, sm.column() +
column, m, n, args... );
1604 ,
typename... RSAs >
1605 inline decltype(
auto)
subvector( const MatVecMultExpr<VT>& vector, RSAs... args )
1609 using MT = RemoveReference_t< LeftOperand_t< VectorType_t<VT> > >;
1611 const SubvectorData<CSAs...> sd( args... );
1613 decltype(
auto) left ( (~vector).leftOperand() );
1614 decltype(auto) right( (~vector).rightOperand() );
1622 ?( sd.offset() + sd.
size() - 1UL )
1623 :( sd.offset() + sd.
size() ) ) )
1648 , typename... RSAs >
1649 inline decltype(auto)
subvector( const TVecMatMultExpr<VT>& vector, RSAs... args )
1653 using MT = RemoveReference_t< RightOperand_t< VectorType_t<VT> > >;
1655 const SubvectorData<CSAs...> sd( args... );
1657 decltype(
auto) left ( (~vector).leftOperand() );
1658 decltype(auto) right( (~vector).rightOperand() );
1666 ?( sd.offset() + sd.
size() - 1UL )
1667 :( sd.offset() + sd.
size() ) ) )
1669 :( right.
rows() ) ) );
1692 , typename... RSAs >
1693 inline decltype(auto)
subvector( const MatReduceExpr<VT,
columnwise>& vector, RSAs... args )
1697 const SubvectorData<CSAs...> sd( args... );
1698 const size_t M( (~vector).operand().
rows() );
1700 decltype(
auto) sm(
submatrix<AF>( (~vector).operand(), 0UL, sd.offset(), M, sd.
size() ) );
1722 , typename... RSAs >
1723 inline decltype(auto)
subvector( const MatReduceExpr<VT,
rowwise>& vector, RSAs... args )
1727 const SubvectorData<CSAs...> sd( args... );
1728 const size_t N( (~vector).operand().
columns() );
1730 decltype(
auto) sm(
submatrix<AF>( (~vector).operand(), sd.offset(), 0UL, sd.
size(), N ) );
1761 inline decltype(auto)
row( MT&& sm, RRAs... args )
1772 return subvector<J,N>( row<I+I2>( sm.operand(), args... ),
unchecked );
1791 template<
typename MT
1793 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
1794 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
1795 inline decltype(
auto)
row( MT&& sm,
size_t index, RRAs... args )
1807 if( ( index >= M ) ) {
1815 return subvector<J,N>(
row( sm.operand(), I+index, args... ),
unchecked );
1833 template<
size_t... CRAs
1836 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
1837 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
1838 inline decltype(
auto)
row( MT&& sm, RRAs... args )
1842 const RowData<CRAs...> rd( args... );
1847 if( ( rd.row() >= sm.rows() ) ) {
1855 const size_t index( rd.row() + sm.row() );
1886 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
1887 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
1888 inline decltype(
auto)
rows( MT&& sm, RRAs... args )
1897 return submatrix<0UL,J,
sizeof...(Is)+1UL,N>(
1920 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
1921 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
1922 inline decltype(
auto)
rows( MT&& sm, RRAs... args )
1929 static constexpr
size_t indices[] = { I, Is... };
1930 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
1931 if( sm.rows() <= indices[i] ) {
1937 return submatrix(
rows( sm.operand(), { I+sm.row(), Is+sm.row()... }, args... ),
1938 0UL, sm.column(),
sizeof...(Is)+1UL, sm.columns(),
unchecked );
1958 template<
typename MT
1961 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
1962 inline decltype(
auto)
rows( MT&& sm, T* indices,
size_t n, RRAs... args )
1969 for(
size_t i=0UL; i<n; ++i ) {
1970 if( sm.rows() <= size_t( indices[i] ) ) {
1976 SmallArray<size_t,128UL> newIndices( indices, indices+n );
1977 std::for_each( newIndices.begin(), newIndices.end(),
1978 [
row=sm.row()](
size_t& index ){ index +=
row; } );
1980 return submatrix(
rows( sm.operand(), newIndices.data(), n, args... ),
1981 0UL, sm.column(), n, sm.columns(),
unchecked );
2001 template<
typename MT
2004 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
2005 inline decltype(
auto)
rows( MT&& sm, P p,
size_t n, RRAs... args )
2012 for(
size_t i=0UL; i<n; ++i ) {
2013 if( sm.rows() <= size_t( p(i) ) ) {
2019 return submatrix(
rows( sm.operand(), [p,offset=sm.row()](
size_t i ){
return p(i)+offset; }, n, args... ),
2020 0UL, sm.column(), n, sm.columns(),
unchecked );
2048 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2049 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2050 inline decltype(
auto)
column( MT&& sm, RCAs... args )
2061 return subvector<I2,M>( column<I+J>( sm.operand(), args... ),
unchecked );
2080 template<
typename MT
2082 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2083 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2084 inline decltype(
auto)
column( MT&& sm,
size_t index, RCAs... args )
2096 if( ( index >= N ) ) {
2104 return subvector<I,M>(
column( sm.operand(), J+index, args... ),
unchecked );
2122 template<
size_t... CCAs
2125 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2126 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2127 inline decltype(
auto)
column( MT&& sm, RCAs... args )
2131 const ColumnData<CCAs...> cd( args... );
2136 if( ( cd.column() >= sm.columns() ) ) {
2144 const size_t index( cd.column() + sm.column() );
2175 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2176 RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2177 inline decltype(
auto)
columns( MT&& sm, RCAs... args )
2186 return submatrix<I2,0UL,M,
sizeof...(Is)+1UL>(
2209 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > &&
2210 !RemoveReference_t<MT>::compileTimeArgs >* =
nullptr >
2211 inline decltype(
auto)
columns( MT&& sm, RCAs... args )
2218 static constexpr
size_t indices[] = { I, Is... };
2219 for(
size_t j=0UL; j<
sizeof...(Is)+1UL; ++j ) {
2220 if( sm.columns() <= indices[j] ) {
2226 return submatrix(
columns( sm.operand(), { I+sm.column(), Is+sm.column()... }, args... ),
2227 sm.row(), 0UL, sm.rows(),
sizeof...(Is)+1UL,
unchecked );
2247 template<
typename MT
2250 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
2251 inline decltype(
auto)
columns( MT&& sm, T* indices,
size_t n, RCAs... args )
2258 for(
size_t j=0UL; j<n; ++j ) {
2259 if( sm.columns() <= size_t( indices[j] ) ) {
2265 SmallArray<size_t,128UL> newIndices( indices, indices+n );
2266 std::for_each( newIndices.begin(), newIndices.end(),
2267 [
column=sm.column()](
size_t& index ){ index +=
column; } );
2270 sm.row(), 0UL, sm.rows(), n,
unchecked );
2290 template<
typename MT
2293 , EnableIf_t< IsSubmatrix_v< RemoveReference_t<MT> > >* =
nullptr >
2294 inline decltype(
auto)
columns( MT&& sm, P p,
size_t n, RCAs... args )
2301 for(
size_t j=0UL; j<n; ++j ) {
2302 if( sm.columns() <= size_t( p(j) ) ) {
2308 return submatrix(
columns( sm.operand(), [p,offset=sm.column()](
size_t i ){
return p(i)+offset; }, n, args... ),
2309 sm.row(), 0UL, sm.rows(), n,
unchecked );
2331 template<
typename MT
2336 inline void reset( Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2352 template<
typename MT
2357 inline void reset( Submatrix<MT,AF,SO,DF,CSAs...>&& sm )
2379 template<
typename MT
2384 inline void reset( Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i )
2402 template<
typename MT
2407 inline void clear( Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2425 template<
typename MT
2430 inline void clear( Submatrix<MT,AF,SO,DF,CSAs...>&& sm )
2469 inline bool isDefault(
const Submatrix<MT,AF,SO,true,CSAs...>& sm )
2474 for(
size_t i=0UL; i<(~sm).
rows(); ++i )
2475 for(
size_t j=0UL; j<(~sm).
columns(); ++j )
2476 if( !isDefault<RF>( (~sm)(i,j) ) )
2480 for(
size_t j=0UL; j<(~sm).
columns(); ++j )
2481 for(
size_t i=0UL; i<(~sm).
rows(); ++i )
2482 if( !isDefault<RF>( (~sm)(i,j) ) )
2523 inline bool isDefault(
const Submatrix<MT,AF,SO,false,CSAs...>& sm )
2527 const size_t iend( ( SO ==
rowMajor)?( sm.rows() ):( sm.columns() ) );
2529 for(
size_t i=0UL; i<iend; ++i ) {
2530 for(
auto element=sm.cbegin(i); element!=sm.cend(i); ++element )
2531 if( !isDefault<RF>( element->value() ) )
return false;
2559 template<
typename MT
2564 inline bool isIntact(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm ) noexcept
2566 return ( sm.row() + sm.rows() <= sm.operand().rows() &&
2567 sm.column() + sm.columns() <= sm.operand().columns() &&
2595 template<
typename MT
2600 inline bool isSymmetric(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2602 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2604 if( IsSymmetric_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2606 else return isSymmetric( static_cast<const BaseType&>( sm ) );
2633 template<
typename MT
2638 inline bool isHermitian(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2640 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2642 if( IsHermitian_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2644 else return isHermitian( static_cast<const BaseType&>( sm ) );
2681 template<
typename MT
2686 inline bool isLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2688 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2690 if( IsLower_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2692 else return isLower( static_cast<const BaseType&>( sm ) );
2728 template<
typename MT
2733 inline bool isUniLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2735 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2737 if( IsUniLower_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2739 else return isUniLower( static_cast<const BaseType&>( sm ) );
2775 template<
typename MT
2780 inline bool isStrictlyLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2782 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2784 if( IsStrictlyLower_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2823 template<
typename MT
2828 inline bool isUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2830 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2832 if( IsUpper_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2834 else return isUpper( static_cast<const BaseType&>( sm ) );
2870 template<
typename MT
2875 inline bool isUniUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2877 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2879 if( IsUniUpper_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2881 else return isUniUpper( static_cast<const BaseType&>( sm ) );
2917 template<
typename MT
2922 inline bool isStrictlyUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
2924 using BaseType =
BaseType_t< Submatrix<MT,AF,SO,DF,CSAs...> >;
2926 if( IsStrictlyUpper_v<MT> && sm.row() == sm.column() && sm.rows() == sm.columns() )
2947 template<
typename MT
2952 inline bool isSame(
const Submatrix<MT,AF,SO,DF,CSAs...>& a,
const Matrix<MT,SO>& b ) noexcept
2954 return (
isSame( a.operand(), ~b ) &&
2955 ( a.rows() == (~b).
rows() ) &&
2956 ( a.columns() == (~b).
columns() ) );
2975 template<
typename MT
2980 inline bool isSame(
const Matrix<MT,SO>& a,
const Submatrix<MT,AF,SO,DF,CSAs...>& b ) noexcept
2982 return (
isSame( ~a, b.operand() ) &&
2983 ( (~a).rows() == b.rows() ) &&
2984 ( (~a).columns() == b.columns() ) );
3003 template<
typename MT1
3013 inline bool isSame(
const Submatrix<MT1,AF1,SO1,DF1,CSAs1...>& a,
3014 const Submatrix<MT2,AF2,SO2,DF2,CSAs2...>& b ) noexcept
3016 return (
isSame( a.operand(), b.operand() ) &&
3017 ( a.row() == b.row() ) && ( a.column() == b.column() ) &&
3018 ( a.rows() == b.rows() ) && ( a.columns() == b.columns() ) );
3068 inline auto invert( Submatrix<MT,AF,SO,true,CSAs...>& sm )
3069 -> DisableIf_t< HasMutableDataAccess_v<MT> >
3071 using RT =
ResultType_t< Submatrix<MT,AF,SO,
true,CSAs...> >;
3100 template<
typename MT
3106 inline bool trySet(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3111 return trySet( sm.operand(), sm.row()+i, sm.column()+j, value );
3135 template<
typename MT
3142 trySet(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3149 return trySet( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3171 template<
typename MT
3177 inline bool tryAdd(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3182 return tryAdd( sm.operand(), sm.row()+i, sm.column()+j, value );
3206 template<
typename MT
3213 tryAdd(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3220 return tryAdd( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3242 template<
typename MT
3248 inline bool trySub(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3253 return trySub( sm.operand(), sm.row()+i, sm.column()+j, value );
3277 template<
typename MT
3284 trySub(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3291 return trySub( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3313 template<
typename MT
3319 inline bool tryMult(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3324 return tryMult( sm.operand(), sm.row()+i, sm.column()+j, value );
3348 template<
typename MT
3355 tryMult(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3362 return tryMult( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3384 template<
typename MT
3390 inline bool tryDiv(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3395 return tryDiv( sm.operand(), sm.row()+i, sm.column()+j, value );
3419 template<
typename MT
3426 tryDiv(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3433 return tryDiv( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3455 template<
typename MT
3460 inline bool tryShift(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
int count )
3465 return tryShift( sm.operand(), sm.row()+i, sm.column()+j, count );
3489 template<
typename MT
3495 tryShift(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
int count )
3502 return tryShift( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, count );
3524 template<
typename MT
3530 inline bool tryBitand(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3535 return tryBitand( sm.operand(), sm.row()+i, sm.column()+j, value );
3559 template<
typename MT
3566 tryBitand(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3573 return tryBitand( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3595 template<
typename MT
3601 inline bool tryBitor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3606 return tryBitor( sm.operand(), sm.row()+i, sm.column()+j, value );
3630 template<
typename MT
3637 tryBitor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3644 return tryBitor( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3666 template<
typename MT
3672 inline bool tryBitxor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
3677 return tryBitxor( sm.operand(), sm.row()+i, sm.column()+j, value );
3701 template<
typename MT
3708 tryBitxor(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
3715 return tryBitxor( sm.operand(), sm.row()+
row, sm.column()+
column, m, n, value );
3737 template<
typename MT
3744 inline bool tryAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
3745 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
3752 return tryAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
3775 template<
typename MT
3782 inline bool tryAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
3783 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
3790 return tryAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
3791 lhs.row() +
row, lhs.column() +
column );
3813 template<
typename MT1
3820 inline bool tryAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
3821 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
3828 return tryAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
3850 template<
typename MT
3857 inline bool tryAddAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
3858 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
3865 return tryAddAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
3889 template<
typename MT
3896 inline bool tryAddAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
3897 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
3904 return tryAddAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
3905 lhs.row() +
row, lhs.column() +
column );
3927 template<
typename MT1
3934 inline bool tryAddAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
3935 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
3942 return tryAddAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
3964 template<
typename MT
3971 inline bool trySubAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
3972 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
3979 return trySubAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4003 template<
typename MT
4010 inline bool trySubAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4011 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
4018 return trySubAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
4019 lhs.row() +
row, lhs.column() +
column );
4041 template<
typename MT1
4048 inline bool trySubAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4049 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4056 return trySubAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4078 template<
typename MT
4085 inline bool tryMultAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4086 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4093 return tryMultAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4117 template<
typename MT
4124 inline bool tryMultAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4125 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
4132 return tryMultAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
4133 lhs.row() +
row, lhs.column() +
column );
4155 template<
typename MT1
4162 inline bool trySchurAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4163 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4170 return trySchurAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4192 template<
typename MT
4199 inline bool tryDivAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4200 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4207 return tryDivAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4231 template<
typename MT
4238 inline bool tryDivAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4239 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
4246 return tryDivAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
4247 lhs.row() +
row, lhs.column() +
column );
4269 template<
typename MT
4276 inline bool tryShiftAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4277 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4284 return tryShiftAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4308 template<
typename MT
4315 inline bool tryShiftAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4316 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
4323 return tryShiftAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
4324 lhs.row() +
row, lhs.column() +
column );
4346 template<
typename MT1
4353 inline bool tryShiftAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4354 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4361 return tryShiftAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4383 template<
typename MT
4390 inline bool tryBitandAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4391 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4398 return tryBitandAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4422 template<
typename MT
4429 inline bool tryBitandAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4430 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
4437 return tryBitandAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
4438 lhs.row() +
row, lhs.column() +
column );
4460 template<
typename MT1
4467 inline bool tryBitandAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4468 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4475 return tryBitandAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4497 template<
typename MT
4504 inline bool tryBitorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4505 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4512 return tryBitorAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4536 template<
typename MT
4543 inline bool tryBitorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4544 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
4551 return tryBitorAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
4552 lhs.row() +
row, lhs.column() +
column );
4574 template<
typename MT1
4581 inline bool tryBitorAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4582 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4589 return tryBitorAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4611 template<
typename MT
4618 inline bool tryBitxorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4619 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
4626 return tryBitxorAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4650 template<
typename MT
4657 inline bool tryBitxorAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4658 const Vector<VT,TF>& rhs, ptrdiff_t
band,
size_t row,
size_t column )
4665 return tryBitxorAssign( lhs.operand(), ~rhs,
band + ptrdiff_t( lhs.column() - lhs.row() ),
4666 lhs.row() +
row, lhs.column() +
column );
4688 template<
typename MT1
4695 inline bool tryBitxorAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4696 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
4703 return tryBitxorAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4724 template<
typename MT
4732 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF,I,J,M,N>& dm )
4734 return submatrix<AF,I,J,M,N>( derestrict( dm.operand() ),
unchecked );
4755 template<
typename MT
4763 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF,I,J,M,N>&& dm )
4765 return submatrix<AF,I,J,M,N>( derestrict( dm.operand() ),
unchecked );
4786 template<
typename MT
4790 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF>& dm )
4792 return submatrix<AF>( derestrict( dm.operand() ), dm.row(), dm.column(), dm.rows(), dm.columns(),
unchecked );
4813 template<
typename MT
4817 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF>&& dm )
4819 return submatrix<AF>( derestrict( dm.operand() ), dm.row(), dm.column(), dm.rows(), dm.columns(),
unchecked );
4835 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4836 struct Size< Submatrix<MT,AF,SO,DF,I,J,M,N>, 0UL >
4840 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4841 struct Size< Submatrix<MT,AF,SO,DF,I,J,M,N>, 1UL >
4858 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4859 struct MaxSize< Submatrix<MT,AF,SO,DF,I,J,M,N>, 0UL >
4863 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4864 struct MaxSize< Submatrix<MT,AF,SO,DF,I,J,M,N>, 1UL >
4881 template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs >
4882 struct IsRestricted< Submatrix<MT,AF,SO,DF,CSAs...> >
4883 :
public IsRestricted<MT>
4899 template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
4900 struct HasConstDataAccess< Submatrix<MT,AF,SO,true,CSAs...> >
4901 :
public HasConstDataAccess<MT>
4917 template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
4918 struct HasMutableDataAccess< Submatrix<MT,AF,SO,true,CSAs...> >
4919 :
public HasMutableDataAccess<MT>
4935 template<
typename MT,
bool SO,
size_t... CSAs >
4936 struct IsAligned< Submatrix<MT,
aligned,SO,true,CSAs...> >
4953 template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
4954 struct IsContiguous< Submatrix<MT,AF,SO,true,CSAs...> >
4955 :
public IsContiguous<MT>
4971 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4972 struct IsSymmetric< Submatrix<MT,AF,SO,DF,I,J,M,N> >
4973 :
public BoolConstant< ( IsSymmetric_v<MT> && I == J && M == N ) >
4989 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4990 struct IsHermitian< Submatrix<MT,AF,SO,DF,I,J,M,N> >
4991 :
public BoolConstant< ( IsHermitian_v<MT> && I == J && M == N ) >
5007 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5008 struct IsLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5009 :
public BoolConstant< ( IsLower_v<MT> && I == J && M == N ) ||
5010 ( IsStrictlyLower_v<MT> && I == J+1UL && M == N ) >
5026 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5027 struct IsUniLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5028 :
public BoolConstant< ( IsUniLower_v<MT> && I == J && M == N ) >
5044 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5045 struct IsStrictlyLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5046 :
public BoolConstant< ( IsLower_v<MT> && I < J && M == N ) ||
5047 ( IsStrictlyLower_v<MT> && I == J && M == N ) >
5063 template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5064 struct IsUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5065 : public BoolConstant< ( IsUpper_v<MT> && I == J && M == N ) ||
5066 ( IsStrictlyUpper_v<MT> && I+1UL == J && M == N ) >
5082 template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5083 struct IsUniUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5084 : public BoolConstant< ( IsUniUpper_v<MT> && I == J && M == N ) >
5100 template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5101 struct IsStrictlyUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5102 : public BoolConstant< ( IsUpper_v<MT> && I > J && M == N ) ||
5103 ( IsStrictlyUpper_v<MT> && I == J && M == N ) >
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.Via these flags it is possible to specify subvec...
Definition: AlignmentFlag.h:62
#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.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Headerfile for the generic min algorithm.
Header file for the blaze::checked and blaze::unchecked instances.
bool isLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower triangular matrix.
Definition: DenseMatrix.h:1793
bool isUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper triangular matrix.
Definition: DenseMatrix.h:2060
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1968
Header file for the implementation of the RowData class template.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression,...
Definition: Assert.h:117
Header file for the alignment flag values.
Header file for the IsUniUpper type 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
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:992
Header file for basic type definitions.
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:178
IntegralConstant< ptrdiff_t, N > Ptrdiff_t
Compile time integral constant wrapper for ptrdiff_t.The Ptrdiff_t alias template represents an integ...
Definition: IntegralConstant.h:237
Header file for the MatReduceExpr base class.
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
Header file for the MatTransExpr base class.
Header file for the dense matrix inversion flags.
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1881
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
Header file for the MatEvalExpr base class.
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:154
Header file for the MAYBE_UNUSED function template.
typename RemoveReference< T >::Type RemoveReference_t
Auxiliary alias declaration for the RemoveReference type trait.The RemoveReference_t alias declaratio...
Definition: RemoveReference.h:95
Header file for the MatMatMultExpr base class.
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
constexpr bool IsLower_v
Auxiliary variable template for the IsLower type trait.The IsLower_v variable template provides a con...
Definition: IsLower.h:175
#define BLAZE_STATIC_ASSERT_MSG(expr, msg)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:123
Header file for the IsUniLower type trait.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
constexpr bool IsStrictlyLower_v
Auxiliary variable template for the IsStrictlyLower type trait.The IsStrictlyLower_v variable templat...
Definition: IsStrictlyLower.h:173
Header file for the MatMatKronExpr base class.
constexpr bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:779
Submatrix specialization for dense matrices.
Header file for the MatMapExpr base class.
Header file for the implementation of the Subvector view.
decltype(auto) reduce(const DenseMatrix< MT, SO > &dm, OP op)
Performs a custom reduction operation on the given dense matrix.
Definition: DMatReduceExpr.h:2017
Headerfile for the generic max algorithm.
Header file for the DisableIf class template.
Header file for the SmallArray implementation.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
constexpr bool IsStrictlyUpper_v
Auxiliary variable template for the IsStrictlyUpper type trait.The IsStrictlyUpper_v variable templat...
Definition: IsStrictlyUpper.h:173
Header file for the IsSubmatrix type trait.
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:1162
Header file for the implementation of the Submatrix base template.
Header file for the MatMatSubExpr base class.
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.The Contains_v variable template provides a c...
Definition: Contains.h:138
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
Header file for the TransposeFlag type trait.
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:786
Submatrix specialization for sparse matrices.
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:1198
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:438
Constraint on the data type.
Constraint on the data type.
Header file for the MatSerialExpr base class.
Header file for the VecTVecMultExpr base class.
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:615
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition: Band.h:137
Flag for aligned vectors and matrices.
Definition: AlignmentFlag.h:65
Header file for the HasConstDataAccess type trait.
Header file for the DeclExpr base class.
Header file for the Matrix base class.
constexpr size_t columnwise
Reduction flag for column-wise reduction operations.
Definition: ReductionFlag.h:90
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:2235
decltype(subsequence< Is... >(shift< Offset >(make_index_sequence< N >()))) make_shifted_index_subsequence
Auxiliary alias declaration for the setup of shifted index subsequences.The make_shifted_index_subseq...
Definition: IntegerSequence.h:248
Header file for the MatScalarMultExpr base class.
Header file for run time assertion macros.
Header file for the Unique class template.
Header file for the IsContiguous type trait.
Check< false > Unchecked
Type of the blaze::unchecked instance.blaze::Unchecked is the type of the blaze::unchecked instance,...
Definition: Check.h:96
Header file for the SchurExpr base class.
decltype(auto) expand(const DenseVector< VT, TF > &dv, size_t expansion)
Expansion of the given dense vector.
Definition: DVecExpandExpr.h:739
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:1406
constexpr bool IsSubmatrix_v
Auxiliary variable template for the IsSubmatrix type trait.The IsSubmatrix_v variable template provid...
Definition: IsSubmatrix.h:161
Header file for the isDefault shim.
constexpr bool IsUpper_v
Auxiliary variable template for the IsUpper type trait.The IsUpper_v variable template provides a con...
Definition: IsUpper.h:175
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:114
typename T::VectorType VectorType_t
Alias declaration for nested VectorType type definitions.The VectorType_t alias declaration provides ...
Definition: Aliases.h:510
Header file for the TVecMatMultExpr base class.
Header file for the integer_sequence and index_sequence aliases.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Header file for the HasMutableDataAccess type trait.
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:1328
#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
Header file for the MatMatAddExpr base class.
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
Header file for the RemoveReference type trait.
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
Header file for the VecExpandExpr base class.
typename T::BaseType BaseType_t
Alias declaration for nested BaseType type definitions.The BaseType_t alias declaration provides a co...
Definition: Aliases.h:70
constexpr size_t rowwise
Reduction flag for row-wise reduction operations.
Definition: ReductionFlag.h:70
Header file for the MatMatMapExpr base class.
Header file for the IntegralConstant class template.
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:2148
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
Header file for the IsUpper type trait.
Header file for the implementation of the ColumnData class template.
Header file for the MatScalarDivExpr base class.
Header file for the MatVecMultExpr base class.
Header file for the IsHermitian type trait.
Header file for the IsRestricted type trait.
Header file for the Size type trait.
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
Header file for the reduction flags.
Header file for the function trace functionality.
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1121