35 #ifndef _BLAZE_MATH_VIEWS_SUBMATRIX_H_ 36 #define _BLAZE_MATH_VIEWS_SUBMATRIX_H_ 181 return submatrix<unaligned,I,J,M,N>( ~matrix, args... );
250 return submatrix<unaligned,I,J,M,N>( ~matrix, args... );
281 return submatrix<unaligned,I,J,M,N>( ~matrix, args... );
446 using ReturnType =
const Submatrix_<const MT,AF,I,J,M,N>;
544 template<
typename MT
547 inline decltype(
auto)
552 return submatrix<unaligned>( ~matrix,
row,
column, m, n, args... );
614 template<
typename MT
617 inline decltype(
auto)
622 return submatrix<unaligned>( ~matrix,
row,
column, m, n, args... );
646 template<
typename MT
649 inline decltype(
auto)
654 return submatrix<unaligned>( ~matrix,
row,
column, m, n, args... );
733 inline decltype(
auto)
816 inline decltype(
auto)
821 using ReturnType =
const Submatrix_<const MT,AF>;
851 inline decltype(
auto)
890 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) +
891 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... );
917 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) -
918 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... );
944 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) %
945 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... );
976 BLAZE_DECLTYPE_AUTO( left , (~matrix).leftOperand() );
977 BLAZE_DECLTYPE_AUTO( right, (~matrix).rightOperand() );
986 ?( sd.column() + 1UL )
991 ?( sd.row() + sd.rows() - 1UL )
992 :( sd.row() + sd.rows() ) )
996 ?( sd.column() + sd.columns() - 1UL )
997 :( sd.column() + sd.columns() ) )
998 :( left.columns() ) ) );
1000 const size_t diff( ( begin < end )?( end - begin ):( 0UL ) );
1002 return submatrix<AF>( left, sd.row(),
begin, sd.rows(), diff ) *
1003 submatrix<AF>( right, begin, sd.column(), diff, sd.columns() );
1026 ,
typename... RSAs >
1031 return subvector<AF,I,M>( (~matrix).leftOperand(), args... ) *
1032 subvector<AF,J,N>( (~matrix).rightOperand(), args... );
1055 ,
typename... RSAs >
1056 inline decltype(
auto)
1061 return subvector<AF>( (~matrix).leftOperand(),
row, m, args... ) *
1062 subvector<AF>( (~matrix).rightOperand(),
column, n, args... );
1083 ,
typename... RSAs >
1088 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) * (~matrix).rightOperand();
1109 ,
typename... RSAs >
1114 return submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ) / (~matrix).rightOperand();
1135 ,
typename... RSAs >
1140 return map( submatrix<AF,CSAs...>( (~matrix).operand(), args... ), (~matrix).operation() );
1161 ,
typename... RSAs >
1166 return map( submatrix<AF,CSAs...>( (~matrix).leftOperand(), args... ),
1167 submatrix<AF,CSAs...>( (~matrix).rightOperand(), args... ),
1168 (~matrix).operation() );
1189 ,
typename... RSAs >
1194 return eval( submatrix<AF,CSAs...>( (~matrix).operand(), args... ) );
1215 ,
typename... RSAs >
1220 return serial( submatrix<AF,CSAs...>( (~matrix).operand(), args... ) );
1241 ,
typename... RSAs >
1246 return submatrix<AF,CSAs...>( (~matrix).operand(), args... );
1270 ,
typename... RSAs >
1275 return trans( submatrix<AF,J,I,N,M>( (~matrix).operand(), args... ) );
1299 ,
typename... RSAs >
1300 inline decltype(
auto)
1305 return trans( submatrix<AF>( (~matrix).operand(), column, row, n, m, args... ) );
1335 ,
typename... RSAs >
1336 inline decltype(
auto)
submatrix( Submatrix<MT,AF2,SO,DF,I2,J2,M2,N2>& sm, RSAs... args )
1343 return submatrix<AF1,I1+I2,J1+J2,M1,N1>( sm.operand(), args... );
1374 ,
typename... RSAs >
1375 inline decltype(
auto)
submatrix(
const Submatrix<MT,AF2,SO,DF,I2,J2,M2,N2>& sm, RSAs... args )
1382 return submatrix<AF1,I1+I2,J1+J2,M1,N1>( sm.operand(), args... );
1413 ,
typename... RSAs >
1414 inline decltype(
auto)
submatrix( Submatrix<MT,AF2,SO,DF,I2,J2,M2,N2>&& sm, RSAs... args )
1421 return submatrix<AF1,I1+I2,J1+J2,M1,N1>( sm.operand(), args... );
1448 ,
typename... RSAs >
1449 inline decltype(
auto)
submatrix( Submatrix<MT,AF2,SO,DF>& sm, RSAs... args )
1456 if( ( I + M > sm.rows() ) || ( J + N > sm.columns() ) ) {
1465 return submatrix<AF1>( sm.operand(), sm.row() + I, sm.column() + J, M, N, args... );
1493 ,
typename... RSAs >
1494 inline decltype(
auto)
submatrix(
const Submatrix<MT,AF2,SO,DF>& sm, RSAs... args )
1501 if( ( I + M > sm.rows() ) || ( J + N > sm.columns() ) ) {
1510 return submatrix<AF1>( sm.operand(), sm.row() + I, sm.column() + J, M, N, args... );
1538 ,
typename... RSAs >
1539 inline decltype(
auto)
submatrix( Submatrix<MT,AF2,SO,DF>&& sm, RSAs... args )
1546 if( ( I + M > sm.rows() ) || ( J + N > sm.columns() ) ) {
1555 return submatrix<AF1>( sm.operand(), sm.row() + I, sm.column() + J, M, N, args... );
1583 ,
typename... RSAs >
1584 inline decltype(
auto)
1585 submatrix( Submatrix<MT,AF2,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
1586 size_t m,
size_t n, RSAs... args )
1593 if( ( row + m > sm.rows() ) || ( column + n > sm.columns() ) ) {
1599 BLAZE_USER_ASSERT( column + n <= sm.columns(),
"Invalid submatrix specification" );
1602 return submatrix<AF1>( sm.operand(), sm.row() +
row, sm.column() +
column, m, n, args... );
1631 ,
typename... RSAs >
1632 inline decltype(
auto)
1633 submatrix(
const Submatrix<MT,AF2,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
1634 size_t m,
size_t n, RSAs... args )
1641 if( ( row + m > sm.rows() ) || ( column + n > sm.columns() ) ) {
1647 BLAZE_USER_ASSERT( column + n <= sm.columns(),
"Invalid submatrix specification" );
1650 return submatrix<AF1>( sm.operand(), sm.row() +
row, sm.column() +
column, m, n, args... );
1679 ,
typename... RSAs >
1680 inline decltype(
auto)
1681 submatrix( Submatrix<MT,AF2,SO,DF,CSAs...>&& sm,
size_t row,
size_t column,
1682 size_t m,
size_t n, RSAs... args )
1689 if( ( row + m > sm.rows() ) || ( column + n > sm.columns() ) ) {
1695 BLAZE_USER_ASSERT( column + n <= sm.columns(),
"Invalid submatrix specification" );
1698 return submatrix<AF1>( sm.operand(), sm.row() +
row, sm.column() +
column, m, n, args... );
1727 ,
typename... RSAs >
1736 BLAZE_DECLTYPE_AUTO( left , (~vector).leftOperand() );
1737 BLAZE_DECLTYPE_AUTO( right, (~vector).rightOperand() );
1745 ?( sd.offset() + sd.size() - 1UL )
1746 :( sd.offset() + sd.size() ) ) )
1748 :( left.columns() ) ) );
1750 return submatrix<AF>( left, sd.offset(),
column, sd.size(), n ) * subvector<AF>( right, column, n );
1771 ,
typename... RSAs >
1780 BLAZE_DECLTYPE_AUTO( left , (~vector).leftOperand() );
1781 BLAZE_DECLTYPE_AUTO( right, (~vector).rightOperand() );
1789 ?( sd.offset() + sd.size() - 1UL )
1790 :( sd.offset() + sd.size() ) ) )
1792 :( right.rows() ) ) );
1794 return subvector<AF>( left,
row, m ) * submatrix<AF>( right, row, sd.offset(), m, sd.size() );
1828 ,
typename... RRAs >
1829 inline decltype(
auto)
row( Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RRAs... args )
1835 return subvector<J,N>( row<I1+I2>( sm.operand(), args... ),
unchecked );
1862 ,
typename... RRAs >
1863 inline decltype(
auto)
row(
const Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RRAs... args )
1869 return subvector<J,N>( row<I1+I2>( sm.operand(), args... ),
unchecked );
1896 ,
typename... RRAs >
1897 inline decltype(
auto)
row( Submatrix<MT,AF,SO,DF,I2,J,M,N>&& sm, RRAs... args )
1903 return subvector<J,N>( row<I1+I2>( sm.operand(), args... ),
unchecked );
1922 template<
typename MT
1930 ,
typename... RRAs >
1931 inline decltype(
auto)
row( Submatrix<MT,AF,SO,DF,I,J,M,N>& sm,
size_t index, RRAs... args )
1938 if( ( index >= M ) ) {
1946 return subvector<J,N>(
row( sm.operand(), I+index, args... ),
unchecked );
1966 template<
typename MT
1974 ,
typename... RRAs >
1975 inline decltype(
auto)
row(
const Submatrix<MT,AF,SO,DF,I,J,M,N>& sm,
size_t index, RRAs... args )
1982 if( ( index >= M ) ) {
1990 return subvector<J,N>(
row( sm.operand(), I+index, args... ),
unchecked );
2010 template<
typename MT
2018 ,
typename... RRAs >
2019 inline decltype(
auto)
row( Submatrix<MT,AF,SO,DF,I,J,M,N>&& sm,
size_t index, RRAs... args )
2026 if( ( index >= M ) ) {
2034 return subvector<J,N>(
row( sm.operand(), I+index, args... ),
unchecked );
2052 template<
size_t... CRAs
2057 ,
typename... RRAs >
2058 inline decltype(
auto)
row( Submatrix<MT,AF,SO,DF>& sm, RRAs... args )
2062 const RowData<CRAs...> rd( args... );
2067 if( ( rd.row() >= sm.rows() ) ) {
2075 const size_t index( rd.row() + sm.row() );
2096 template<
size_t... CRAs
2101 ,
typename... RRAs >
2102 inline decltype(
auto)
row(
const Submatrix<MT,AF,SO,DF>& sm, RRAs... args )
2106 const RowData<CRAs...> rd( args... );
2111 if( ( rd.row() >= sm.rows() ) ) {
2119 const size_t index( rd.row() + sm.row() );
2140 template<
size_t... CRAs
2145 ,
typename... RRAs >
2146 inline decltype(
auto)
row( Submatrix<MT,AF,SO,DF>&& sm, RRAs... args )
2150 const RowData<CRAs...> rd( args... );
2155 if( ( rd.row() >= sm.rows() ) ) {
2163 const size_t index( rd.row() + sm.row() );
2200 ,
typename... RRAs >
2201 inline decltype(
auto)
rows( Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RRAs... args )
2205 return submatrix<0UL,J,
sizeof...(Is)+1UL,N>(
2234 ,
typename... RRAs >
2235 inline decltype(
auto)
rows(
const Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RRAs... args )
2239 return submatrix<0UL,J,
sizeof...(Is)+1UL,N>(
2268 ,
typename... RRAs >
2269 inline decltype(
auto)
rows( Submatrix<MT,AF,SO,DF,I2,J,M,N>&& sm, RRAs... args )
2273 return submatrix<0UL,J,
sizeof...(Is)+1UL,N>(
2298 ,
typename... RRAs >
2299 inline decltype(
auto)
rows( Submatrix<MT,AF,SO,DF>& sm, RRAs... args )
2306 static constexpr
size_t indices[] = { I1, Is... };
2307 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
2308 if( sm.rows() <= indices[i] ) {
2314 return submatrix(
rows( sm.operand(), { I1+sm.row(), Is+sm.row()... }, args... ),
2315 0UL, sm.column(),
sizeof...(Is)+1UL, sm.columns(),
unchecked );
2340 ,
typename... RRAs >
2341 inline decltype(
auto)
rows(
const Submatrix<MT,AF,SO,DF>& sm, RRAs... args )
2348 static constexpr
size_t indices[] = { I1, Is... };
2349 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
2350 if( sm.rows() <= indices[i] ) {
2356 return submatrix(
rows( sm.operand(), { I1+sm.row(), Is+sm.row()... }, args... ),
2357 0UL, sm.column(),
sizeof...(Is)+1UL, sm.columns(),
unchecked );
2382 ,
typename... RRAs >
2383 inline decltype(
auto)
rows( Submatrix<MT,AF,SO,DF>&& sm, RRAs... args )
2390 static constexpr
size_t indices[] = { I1, Is... };
2391 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
2392 if( sm.rows() <= indices[i] ) {
2398 return submatrix(
rows( sm.operand(), { I1+sm.row(), Is+sm.row()... }, args... ),
2399 0UL, sm.column(),
sizeof...(Is)+1UL, sm.columns(),
unchecked );
2419 template<
typename MT
2425 ,
typename... RRAs >
2426 inline decltype(
auto)
2427 rows( Submatrix<MT,AF,SO,DF,CSAs...>& sm,
const T* indices,
size_t n, RRAs... args )
2434 for(
size_t i=0UL; i<n; ++i ) {
2435 if( sm.rows() <= indices[i] ) {
2442 std::for_each( newIndices.
begin(), newIndices.
end(),
2443 [row=sm.row()](
size_t& index ){ index +=
row; } );
2446 0UL, sm.column(), n, sm.columns(),
unchecked );
2467 template<
typename MT
2473 ,
typename... RRAs >
2474 inline decltype(
auto)
2475 rows(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
const T* indices,
size_t n, RRAs... args )
2482 for(
size_t i=0UL; i<n; ++i ) {
2483 if( sm.rows() <= indices[i] ) {
2490 std::for_each( newIndices.
begin(), newIndices.
end(),
2491 [row=sm.row()](
size_t& index ){ index +=
row; } );
2494 0UL, sm.column(), n, sm.columns(),
unchecked );
2515 template<
typename MT
2521 ,
typename... RRAs >
2522 inline decltype(
auto)
2523 rows( Submatrix<MT,AF,SO,DF,CSAs...>&& sm,
const T* indices,
size_t n, RRAs... args )
2530 for(
size_t i=0UL; i<n; ++i ) {
2531 if( sm.rows() <= indices[i] ) {
2538 std::for_each( newIndices.
begin(), newIndices.
end(),
2539 [row=sm.row()](
size_t& index ){ index +=
row; } );
2542 0UL, sm.column(), n, sm.columns(),
unchecked );
2576 ,
typename... RCAs >
2577 inline decltype(
auto)
column( Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RCAs... args )
2583 return subvector<I2,M>( column<I1+J>( sm.operand(), args... ),
unchecked );
2610 ,
typename... RCAs >
2611 inline decltype(
auto)
column(
const Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RCAs... args )
2617 return subvector<I2,M>( column<I1+J>( sm.operand(), args... ),
unchecked );
2644 ,
typename... RCAs >
2645 inline decltype(
auto)
column( Submatrix<MT,AF,SO,DF,I2,J,M,N>&& sm, RCAs... args )
2651 return subvector<I2,M>( column<I1+J>( sm.operand(), args... ),
unchecked );
2670 template<
typename MT
2678 ,
typename... RCAs >
2679 inline decltype(
auto)
column( Submatrix<MT,AF,SO,DF,I,J,M,N>& sm,
size_t index, RCAs... args )
2686 if( ( index >= N ) ) {
2694 return subvector<I,M>(
column( sm.operand(), J+index, args... ),
unchecked );
2714 template<
typename MT
2722 ,
typename... RCAs >
2723 inline decltype(
auto)
column(
const Submatrix<MT,AF,SO,DF,I,J,M,N>& sm,
size_t index, RCAs... args )
2730 if( ( index >= N ) ) {
2738 return subvector<I,M>(
column( sm.operand(), J+index, args... ),
unchecked );
2758 template<
typename MT
2766 ,
typename... RCAs >
2767 inline decltype(
auto)
column( Submatrix<MT,AF,SO,DF,I,J,M,N>&& sm,
size_t index, RCAs... args )
2774 if( ( index >= N ) ) {
2782 return subvector<I,M>(
column( sm.operand(), J+index, args... ),
unchecked );
2800 template<
size_t... CCAs
2805 ,
typename... RCAs >
2806 inline decltype(
auto)
column( Submatrix<MT,AF,SO,DF>& sm, RCAs... args )
2815 if( ( cd.column() >= sm.columns() ) ) {
2823 const size_t index( cd.column() + sm.column() );
2844 template<
size_t... CCAs
2849 ,
typename... RCAs >
2850 inline decltype(
auto)
column(
const Submatrix<MT,AF,SO,DF>& sm, RCAs... args )
2859 if( ( cd.column() >= sm.columns() ) ) {
2867 const size_t index( cd.column() + sm.column() );
2888 template<
size_t... CCAs
2893 ,
typename... RCAs >
2894 inline decltype(
auto)
column( Submatrix<MT,AF,SO,DF>&& sm, RCAs... args )
2903 if( ( cd.column() >= sm.columns() ) ) {
2911 const size_t index( cd.column() + sm.column() );
2948 ,
typename... RCAs >
2949 inline decltype(
auto)
columns( Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RCAs... args )
2953 return submatrix<I2,0UL,M,
sizeof...(Is)+1UL>(
2982 ,
typename... RCAs >
2983 inline decltype(
auto)
columns(
const Submatrix<MT,AF,SO,DF,I2,J,M,N>& sm, RCAs... args )
2987 return submatrix<I2,0UL,M,
sizeof...(Is)+1UL>(
3016 ,
typename... RCAs >
3017 inline decltype(
auto)
columns( Submatrix<MT,AF,SO,DF,I2,J,M,N>&& sm, RCAs... args )
3021 return submatrix<I2,0UL,M,
sizeof...(Is)+1UL>(
3046 ,
typename... RCAs >
3047 inline decltype(
auto)
columns( Submatrix<MT,AF,SO,DF>& sm, RCAs... args )
3054 static constexpr
size_t indices[] = { I1, Is... };
3055 for(
size_t j=0UL; j<
sizeof...(Is)+1UL; ++j ) {
3056 if( sm.columns() <= indices[j] ) {
3062 return submatrix(
columns( sm.operand(), { I1+sm.column(), Is+sm.column()... }, args... ),
3063 sm.row(), 0UL, sm.rows(),
sizeof...(Is)+1UL,
unchecked );
3088 ,
typename... RCAs >
3089 inline decltype(
auto)
columns(
const Submatrix<MT,AF,SO,DF>& sm, RCAs... args )
3096 static constexpr
size_t indices[] = { I1, Is... };
3097 for(
size_t j=0UL; j<
sizeof...(Is)+1UL; ++j ) {
3098 if( sm.columns() <= indices[j] ) {
3104 return submatrix(
columns( sm.operand(), { I1+sm.column(), Is+sm.column()... }, args... ),
3105 sm.row(), 0UL, sm.rows(),
sizeof...(Is)+1UL,
unchecked );
3130 ,
typename... RCAs >
3131 inline decltype(
auto)
columns( Submatrix<MT,AF,SO,DF>&& sm, RCAs... args )
3138 static constexpr
size_t indices[] = { I1, Is... };
3139 for(
size_t j=0UL; j<
sizeof...(Is)+1UL; ++j ) {
3140 if( sm.columns() <= indices[j] ) {
3146 return submatrix(
columns( sm.operand(), { I1+sm.column(), Is+sm.column()... }, args... ),
3147 sm.row(), 0UL, sm.rows(),
sizeof...(Is)+1UL,
unchecked );
3167 template<
typename MT
3173 ,
typename... RCAs >
3174 inline decltype(
auto)
3175 columns( Submatrix<MT,AF,SO,DF,CSAs...>& sm,
const T* indices,
size_t n, RCAs... args )
3182 for(
size_t j=0UL; j<n; ++j ) {
3183 if( sm.columns() <= indices[j] ) {
3190 std::for_each( newIndices.
begin(), newIndices.
end(),
3191 [column=sm.column()](
size_t& index ){ index +=
column; } );
3194 sm.row(), 0UL, sm.rows(), n,
unchecked );
3215 template<
typename MT
3221 ,
typename... RCAs >
3222 inline decltype(
auto)
3223 columns(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
const T* indices,
size_t n, RCAs... args )
3230 for(
size_t j=0UL; j<n; ++j ) {
3231 if( sm.columns() <= indices[j] ) {
3238 std::for_each( newIndices.
begin(), newIndices.
end(),
3239 [column=sm.column()](
size_t& index ){ index +=
column; } );
3242 sm.row(), 0UL, sm.rows(), n,
unchecked );
3263 template<
typename MT
3269 ,
typename... RCAs >
3270 inline decltype(
auto)
3271 columns( Submatrix<MT,AF,SO,DF,CSAs...>&& sm,
const T* indices,
size_t n, RCAs... args )
3278 for(
size_t j=0UL; j<n; ++j ) {
3279 if( sm.columns() <= indices[j] ) {
3286 std::for_each( newIndices.
begin(), newIndices.
end(),
3287 [column=sm.column()](
size_t& index ){ index +=
column; } );
3290 sm.row(), 0UL, sm.rows(), n,
unchecked );
3312 template<
typename MT
3317 inline void reset( Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3333 template<
typename MT
3338 inline void reset( Submatrix<MT,AF,SO,DF,CSAs...>&& sm )
3360 template<
typename MT
3365 inline void reset( Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i )
3383 template<
typename MT
3388 inline void clear( Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3406 template<
typename MT
3411 inline void clear( Submatrix<MT,AF,SO,DF,CSAs...>&& sm )
3450 inline bool isDefault(
const Submatrix<MT,AF,SO,true,CSAs...>& sm )
3455 for(
size_t i=0UL; i<(~sm).
rows(); ++i )
3456 for(
size_t j=0UL; j<(~sm).
columns(); ++j )
3457 if( !isDefault<RF>( (~sm)(i,j) ) )
3461 for(
size_t j=0UL; j<(~sm).
columns(); ++j )
3462 for(
size_t i=0UL; i<(~sm).
rows(); ++i )
3463 if( !isDefault<RF>( (~sm)(i,j) ) )
3504 inline bool isDefault(
const Submatrix<MT,AF,SO,false,CSAs...>& sm )
3508 const size_t iend( ( SO ==
rowMajor)?( sm.rows() ):( sm.columns() ) );
3510 for(
size_t i=0UL; i<iend; ++i ) {
3511 for(
auto element=sm.cbegin(i); element!=sm.cend(i); ++element )
3512 if( !isDefault<RF>( element->value() ) )
return false;
3540 template<
typename MT
3545 inline bool isIntact(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm ) noexcept
3547 return ( sm.row() + sm.rows() <= sm.operand().rows() &&
3548 sm.column() + sm.columns() <= sm.operand().columns() &&
3576 template<
typename MT
3581 inline bool isSymmetric(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3587 else return isSymmetric( static_cast<const BaseType&>( sm ) );
3614 template<
typename MT
3619 inline bool isHermitian(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3625 else return isHermitian( static_cast<const BaseType&>( sm ) );
3662 template<
typename MT
3667 inline bool isLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3673 else return isLower( static_cast<const BaseType&>( sm ) );
3709 template<
typename MT
3714 inline bool isUniLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3720 else return isUniLower( static_cast<const BaseType&>( sm ) );
3756 template<
typename MT
3761 inline bool isStrictlyLower(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3804 template<
typename MT
3809 inline bool isUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3815 else return isUpper( static_cast<const BaseType&>( sm ) );
3851 template<
typename MT
3856 inline bool isUniUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3862 else return isUniUpper( static_cast<const BaseType&>( sm ) );
3898 template<
typename MT
3903 inline bool isStrictlyUpper(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm )
3928 template<
typename MT
3933 inline bool isSame(
const Submatrix<MT,AF,SO,DF,CSAs...>& a,
const Matrix<MT,SO>& b ) noexcept
3935 return (
isSame( a.operand(), ~b ) &&
3936 ( a.rows() == (~b).
rows() ) &&
3937 ( a.columns() == (~b).
columns() ) );
3956 template<
typename MT
3961 inline bool isSame(
const Matrix<MT,SO>& a,
const Submatrix<MT,AF,SO,DF,CSAs...>& b ) noexcept
3963 return (
isSame( ~a, b.operand() ) &&
3964 ( (~a).rows() == b.rows() ) &&
3965 ( (~a).columns() == b.columns() ) );
3984 template<
typename MT1
3994 inline bool isSame(
const Submatrix<MT1,AF1,SO1,DF1,CSAs1...>& a,
3995 const Submatrix<MT2,AF2,SO2,DF2,CSAs2...>& b ) noexcept
3997 return (
isSame( a.operand(), b.operand() ) &&
3998 ( a.row() == b.row() ) && ( a.column() == b.column() ) &&
3999 ( a.rows() == b.rows() ) && ( a.columns() == b.columns() ) );
4051 using RT =
ResultType_< Submatrix<MT,AF,SO,
true,CSAs...> >;
4080 template<
typename MT
4086 inline bool trySet(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
4091 return trySet( sm.operand(), sm.row()+i, sm.column()+j, value );
4113 template<
typename MT
4119 inline bool tryAdd(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
4124 return tryAdd( sm.operand(), sm.row()+i, sm.column()+j, value );
4146 template<
typename MT
4152 inline bool trySub(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
4157 return trySub( sm.operand(), sm.row()+i, sm.column()+j, value );
4179 template<
typename MT
4185 inline bool tryMult(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
4190 return tryMult( sm.operand(), sm.row()+i, sm.column()+j, value );
4214 template<
typename MT
4221 tryMult(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
4230 return tryMult( sm.operand(), sm.row()+
row, sm.column(), m, n, value );
4252 template<
typename MT
4258 inline bool tryDiv(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t i,
size_t j,
const ET& value )
4263 return tryDiv( sm.operand(), sm.row()+i, sm.column()+j, value );
4287 template<
typename MT
4294 tryDiv(
const Submatrix<MT,AF,SO,DF,CSAs...>& sm,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
4303 return tryDiv( sm.operand(), sm.row()+
row, sm.column(), m, n, value );
4325 template<
typename MT
4332 inline bool tryAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4340 return tryAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4363 template<
typename MT
4370 inline bool tryAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4378 return tryAssign( lhs.operand(), ~rhs, band +
ptrdiff_t( lhs.column() - lhs.row() ),
4379 lhs.row() +
row, lhs.column() +
column );
4401 template<
typename MT1
4408 inline bool tryAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4416 return tryAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4438 template<
typename MT
4445 inline bool tryAddAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4453 return tryAddAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4477 template<
typename MT
4484 inline bool tryAddAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4492 return tryAddAssign( lhs.operand(), ~rhs, band +
ptrdiff_t( lhs.column() - lhs.row() ),
4493 lhs.row() +
row, lhs.column() +
column );
4515 template<
typename MT1
4522 inline bool tryAddAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4530 return tryAddAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4552 template<
typename MT
4559 inline bool trySubAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4567 return trySubAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4591 template<
typename MT
4598 inline bool trySubAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4606 return trySubAssign( lhs.operand(), ~rhs, band +
ptrdiff_t( lhs.column() - lhs.row() ),
4607 lhs.row() +
row, lhs.column() +
column );
4629 template<
typename MT1
4636 inline bool trySubAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4644 return trySubAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4666 template<
typename MT
4673 inline bool tryMultAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4681 return tryMultAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4705 template<
typename MT
4712 inline bool tryMultAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4720 return tryMultAssign( lhs.operand(), ~rhs, band +
ptrdiff_t( lhs.column() - lhs.row() ),
4721 lhs.row() +
row, lhs.column() +
column );
4743 template<
typename MT1
4750 inline bool trySchurAssign(
const Submatrix<MT1,AF,SO1,DF,CSAs...>& lhs,
4758 return trySchurAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4780 template<
typename MT
4787 inline bool tryDivAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4795 return tryDivAssign( lhs.operand(), ~rhs, lhs.row() +
row, lhs.column() +
column );
4819 template<
typename MT
4826 inline bool tryDivAssign(
const Submatrix<MT,AF,SO,DF,CSAs...>& lhs,
4834 return tryDivAssign( lhs.operand(), ~rhs, band +
ptrdiff_t( lhs.column() - lhs.row() ),
4835 lhs.row() +
row, lhs.column() +
column );
4856 template<
typename MT
4864 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF,I,J,M,N>& dm )
4866 return submatrix<AF,I,J,M,N>( derestrict( dm.operand() ),
unchecked );
4887 template<
typename MT
4895 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF,I,J,M,N>&& dm )
4897 return submatrix<AF,I,J,M,N>( derestrict( dm.operand() ),
unchecked );
4918 template<
typename MT
4922 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF>& dm )
4924 return submatrix<AF>( derestrict( dm.operand() ), dm.row(), dm.column(), dm.rows(), dm.columns(),
unchecked );
4945 template<
typename MT
4949 inline decltype(
auto) derestrict( Submatrix<MT,AF,SO,DF>&& dm )
4951 return submatrix<AF>( derestrict( dm.operand() ), dm.row(), dm.column(), dm.rows(), dm.columns(),
unchecked );
4967 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4968 struct Size< Submatrix<MT,AF,SO,DF,I,J,M,N>, 0UL >
4972 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
4973 struct Size< Submatrix<MT,AF,SO,DF,I,J,M,N>, 1UL >
4990 template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs >
5008 template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
5026 template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
5044 template<
typename MT,
bool SO,
size_t... CSAs >
5045 struct IsAligned< Submatrix<MT,aligned,SO,true,CSAs...> >
5062 template<
typename MT,
AlignmentFlag AF,
bool SO,
size_t... CSAs >
5063 struct IsContiguous< Submatrix<MT,AF,SO,true,CSAs...> >
5080 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5081 struct IsSymmetric< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5082 :
public BoolConstant< ( IsSymmetric<MT>::value && I == J && M == N ) >
5098 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5099 struct IsHermitian< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5100 :
public BoolConstant< ( IsHermitian<MT>::value && I == J && M == N ) >
5116 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5117 struct IsLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5118 :
public BoolConstant< ( IsLower<MT>::value && I == J && M == N ) ||
5119 ( IsStrictlyLower<MT>::value && I == J+1UL && M == N ) >
5135 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5136 struct IsUniLower< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5137 :
public BoolConstant< ( IsUniLower<MT>::value && I == J && M == N ) >
5153 template<
typename MT, AlignmentFlag AF,
bool SO,
bool DF,
size_t I,
size_t J,
size_t M,
size_t N >
5155 :
public BoolConstant< ( IsLower<MT>::value && I < J && M == N ) ||
5156 ( IsStrictlyLower<MT>::value && I == J && M == N ) >
5172 template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5173 struct IsUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5174 : public BoolConstant< ( IsUpper<MT>::value && I == J && M == N ) ||
5175 ( IsStrictlyUpper<MT>::value && I+1UL == J && M == N ) >
5191 template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5192 struct IsUniUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5193 : public BoolConstant< ( IsUniUpper<MT>::value && I == J && M == N ) >
5209 template< typename MT, AlignmentFlag AF, bool SO, bool DF, size_t I, size_t J, size_t M, size_t N >
5210 struct IsStrictlyUpper< Submatrix<MT,AF,SO,DF,I,J,M,N> >
5211 : public BoolConstant< ( IsUpper<MT>::value && I > J && M == N ) ||
5212 ( IsStrictlyUpper<MT>::value && I == J && M == N ) >
5228 template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs1,
size_t... CSAs2 >
5229 struct SubmatrixTrait< Submatrix<MT,AF,SO,DF,CSAs1...>, CSAs2... >
5247 template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs,
size_t... CRAs >
5248 struct RowTrait< Submatrix<MT,AF,SO,DF,CSAs...>, CRAs... >
5266 template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs,
size_t... CRAs >
5267 struct RowsTrait< Submatrix<MT,AF,SO,DF,CSAs...>, CRAs... >
5285 template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs,
size_t... CCAs >
5286 struct ColumnTrait< Submatrix<MT,AF,SO,DF,CSAs...>, CCAs... >
5304 template<
typename MT,
AlignmentFlag AF,
bool SO,
bool DF,
size_t... CSAs,
size_t... CCAs >
5305 struct ColumnsTrait< Submatrix<MT,AF,SO,DF,CSAs...>, CCAs... >
5324 struct BandTrait< Submatrix<MT,AF,SO,DF,CSAs...>, CBAs... >
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:329
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
Pointer difference type of the Blaze library.
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:131
Headerfile for the generic min algorithm.
Header file for the blaze::checked and blaze::unchecked instances.
Base class for all vector/matrix multiplication expression templates.The TVecMatMultExpr class serves...
Definition: TVecMatMultExpr.h:67
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
Base class for all binary matrix map expression templates.The MatMatMapExpr class serves as a tag for...
Definition: MatMatMapExpr.h:66
Header file for the implementation of the RowData class template.
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the alignment flag values.
Header file for the UNUSED_PARAMETER function template.
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
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:949
Header file for basic type definitions.
Base class for all matrix serial evaluation expression templates.The MatSerialExpr class serves as a ...
Definition: MatSerialExpr.h:67
Header file for the row trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:109
Base class for all matrix/scalar division expression templates.The MatScalarDivExpr class serves as a...
Definition: MatScalarDivExpr.h:66
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:108
Header file for the serial shim.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the MatTransExpr base class.
Iterator end() noexcept
Returns an iterator just past the last element of the small vector.
Definition: SmallVector.h:620
Header file for the dense matrix inversion flags.
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:364
Auxiliary class template for the data members of the Column class.The auxiliary ColumnData class temp...
Definition: ColumnData.h:64
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1299
Implementation of a dynamic vector with small vector optimization.The SmallVector class template is a...
Definition: SmallVector.h:80
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
Base class for all matrix/scalar multiplication expression templates.The MatScalarMultExpr class serv...
Definition: MatScalarMultExpr.h:67
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1903
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:87
Header file for the MatEvalExpr base class.
Auxiliary class template for the data members of the Subvector class.The auxiliary SubvectorData clas...
Definition: SubvectorData.h:64
Header file for the MatMatMultExpr base class.
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:87
Header file for the decltype(auto) workaround.
#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
typename SubmatrixTrait< MT, CSAs... >::Type SubmatrixTrait_
Auxiliary alias declaration for the SubmatrixTrait type trait.The SubmatrixTrait_ alias declaration p...
Definition: SubmatrixTrait.h:145
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1950
typename RowTrait< MT, CRAs... >::Type RowTrait_
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_ alias declaration provides a co...
Definition: RowTrait.h:145
Base template for the RowsTrait class.
Definition: RowsTrait.h:109
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
Header file for the band trait.
Compile time check for data types with restricted data access.This type trait tests whether the given...
Definition: IsRestricted.h:82
Compile time check for low-level access to mutable data.This type trait tests whether the given data ...
Definition: HasMutableDataAccess.h:75
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
Pointer data() noexcept
Low-level data access to the vector elements.
Definition: SmallVector.h:538
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:772
Submatrix specialization for dense matrices.
Header file for the MatMapExpr base class.
Base template for the RowTrait class.
Definition: RowTrait.h:109
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
Compile time check for the memory layout of data types.This type trait tests whether the given data t...
Definition: IsContiguous.h:86
Headerfile for the generic max algorithm.
typename ColumnTrait< MT, CCAs... >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:144
Header file for the DisableIf class template.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
typename ColumnsTrait< MT, CCAs... >::Type ColumnsTrait_
Auxiliary alias declaration for the ColumnsTrait type trait.The ColumnsTrait_ alias declaration provi...
Definition: ColumnsTrait.h:145
Base class for all matrix/matrix subtraction expression templates.The MatMatSubExpr class serves as a...
Definition: MatMatSubExpr.h:67
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
Header file for the implementation of the Submatrix base template.
Base class for all matrix/matrix addition expression templates.The MatMatAddExpr class serves as a ta...
Definition: MatMatAddExpr.h:66
Header file for the MatMatSubExpr base 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:506
Base class for all unary matrix map expression templates.The MatMapExpr class serves as a tag for all...
Definition: MatMapExpr.h:66
Base class for all matrix/vector multiplication expression templates.The MatVecMultExpr class serves ...
Definition: MatVecMultExpr.h:67
Implementation of a type list.The TypeList class template represents a list of data types of arbitrar...
Definition: TypeList.h:119
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:794
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
typename RemoveReference< T >::Type RemoveReference_
Auxiliary alias declaration for the RemoveReference type trait.The RemoveReference_ alias declaration...
Definition: RemoveReference.h:95
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
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:430
Constraint on the data type.
Constraint on the data type.
Header file for the MatSerialExpr base class.
Header file for the VecTVecMultExpr base class.
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:360
typename BandTrait< MT, CBAs... >::Type BandTrait_
Auxiliary alias declaration for the BandTrait type trait.The BandTrait_ alias declaration provides a ...
Definition: BandTrait.h:145
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition: Band.h:134
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
typename RowsTrait< MT, CRAs... >::Type RowsTrait_
Auxiliary alias declaration for the RowsTrait type trait.The RowsTrait_ alias declaration provides a ...
Definition: RowsTrait.h:145
Header file for the HasConstDataAccess type trait.
Header file for the DeclExpr base class.
Base class for all matrix/matrix multiplication expression templates.The MatMatMultExpr class serves ...
Definition: MatMatMultExpr.h:67
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
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:179
Header file for the MatScalarMultExpr base class.
Base class for all Schur product expression templates.The SchurExpr class serves as a tag for all exp...
Definition: SchurExpr.h:66
Header file for run time assertion macros.
Header file for the Unique class template.
Header file for the submatrix trait.
Header file for the IsContiguous type trait.
Header file for the columns trait.
Header file for the SchurExpr base class.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
Compile time integral constant wrapper for ptrdiff_t.The PtrdiffT class template represents an integr...
Definition: PtrdiffT.h:72
Base class for all matrix evaluation expression templates.The MatEvalExpr class serves as a tag for a...
Definition: MatEvalExpr.h:66
#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:919
Header file for the column trait.
Header file for the isDefault shim.
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:101
Header file for the TVecMatMultExpr base class.
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:816
Base class for all matrix transposition expression templates.The MatTransExpr class serves as a tag f...
Definition: MatTransExpr.h:66
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:841
#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.
Header file for the RemoveReference type trait.
Base class for all outer product expression templates.The VecTVecMultExpr class serves as a tag for a...
Definition: VecTVecMultExpr.h:67
Header file for the rows 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:490
Auxiliary class template for the data members of the Row class.The auxiliary RowData class template r...
Definition: RowData.h:64
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:789
Base template for the ColumnsTrait class.
Definition: ColumnsTrait.h:109
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:177
Auxiliary class template for the data members of the Submatrix class.The auxiliary SubmatrixData clas...
Definition: SubmatrixData.h:64
const bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
Header file for the MatMatMapExpr base class.
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
Iterator begin() noexcept
Returns an iterator to the first element of the small vector.
Definition: SmallVector.h:572
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:1554
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
Header file for the IsUpper type trait.
Header file for the implementation of the ColumnData class template.
Header file for the MatScalarDivExpr base class.
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Searching a type list.The Contains class can be used to search the type list for a particular type Ty...
Definition: Contains.h:78
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, 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.
Base template for the BandTrait class.
Definition: BandTrait.h:109
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 function trace functionality.
Template for the blaze::checked and blaze::unchecked instances.blaze::Check is the template for the b...
Definition: Check.h:56
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:1134