35 #ifndef _BLAZE_MATH_VIEWS_COLUMNS_H_ 36 #define _BLAZE_MATH_VIEWS_COLUMNS_H_ 199 using ReturnType =
const Columns_<
const MT,I,Is...>;
273 template<
typename MT
277 inline decltype(
auto)
columns(
Matrix<MT,SO>& matrix, const T* indices,
size_t n, RCAs... args )
282 return ReturnType( ~matrix, indices, n, args... );
327 template<
typename MT
331 inline decltype(
auto)
columns( const
Matrix<MT,SO>& matrix, const T* indices,
size_t n, RCAs... args )
336 return ReturnType( ~matrix, indices, n, args... );
356 template<
typename MT
360 inline decltype(
auto)
columns(
Matrix<MT,SO>&& matrix, const T* indices,
size_t n, RCAs... args )
365 return ReturnType( ~matrix, indices, n, args... );
386 template<
typename MT
395 return columns<Is...>( std::forward<MT>( matrix ), args... );
417 template<
typename MT
424 return columns( std::forward<MT>( matrix ), indices.begin(), indices.size(), args... );
446 template<
typename MT
450 inline decltype(
auto)
columns( MT&& matrix,
const std::array<T,N>& indices, RCAs... args )
454 return columns( std::forward<MT>( matrix ), indices.data(), N, args... );
476 template<
typename MT
479 inline decltype(
auto)
columns( MT&& matrix,
const std::vector<T>& indices, RCAs... args )
483 return columns( std::forward<MT>( matrix ), indices.data(), indices.size(), args... );
505 template<
typename MT
513 return columns( std::forward<MT>( matrix ), indices.
data(), indices.
size(), args... );
539 template<
size_t... CCAs
542 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
547 return columns<CCAs...>( (~matrix).leftOperand(), args... ) +
548 columns<CCAs...>( (~matrix).rightOperand(), args... );
566 template<
size_t... CCAs
569 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
574 return columns<CCAs...>( (~matrix).leftOperand(), args... ) -
575 columns<CCAs...>( (~matrix).rightOperand(), args... );
593 template<
size_t... CCAs
596 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
601 return columns<CCAs...>( (~matrix).leftOperand(), args... ) %
602 columns<CCAs...>( (~matrix).rightOperand(), args... );
620 template<
size_t... CCAs
623 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
628 return (~matrix).leftOperand() *
columns<CCAs...>( (~matrix).rightOperand(), args... );
646 template<
size_t... CCAs
649 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
654 return (~matrix).leftOperand() *
elements<CCAs...>( (~matrix).rightOperand(), args... );
672 template<
size_t... CCAs
675 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
680 return columns<CCAs...>( (~matrix).leftOperand(), args... ) * (~matrix).rightOperand();
698 template<
size_t... CCAs
701 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
706 return columns<CCAs...>( (~matrix).leftOperand(), args... ) / (~matrix).rightOperand();
724 template<
size_t... CCAs
727 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
732 return map( columns<CCAs...>( (~matrix).operand(), args... ), (~matrix).operation() );
750 template<
size_t... CCAs
753 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
758 return map( columns<CCAs...>( (~matrix).leftOperand(), args... ),
759 columns<CCAs...>( (~matrix).rightOperand(), args... ),
760 (~matrix).operation() );
778 template<
size_t... CCAs
781 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
786 return eval( columns<CCAs...>( (~matrix).operand(), args... ) );
804 template<
size_t... CCAs
807 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
812 return serial( columns<CCAs...>( (~matrix).operand(), args... ) );
830 template<
size_t... CCAs
833 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
838 return columns<CCAs...>( (~matrix).operand(), args... );
856 template<
size_t... CCAs
859 ,
typename =
EnableIfTrue_< (
sizeof...( CCAs ) +
sizeof...( RCAs ) > 0UL ) > >
864 return trans( rows<CCAs...>( (~matrix).operand(), args... ) );
891 inline decltype(
auto)
columns( Columns<MT,SO,DF,SF,I2,Is2...>& c, RCAs... args )
895 static constexpr
size_t indices[] = { I2, Is2... };
896 return columns< indices[I1], indices[Is1]... >( c.operand(), args... );
923 inline decltype(
auto)
columns(
const Columns<MT,SO,DF,SF,I2,Is2...>& c, RCAs... args )
927 static constexpr
size_t indices[] = { I2, Is2... };
928 return columns< indices[I1], indices[Is1]... >( c.operand(), args... );
955 inline decltype(
auto)
columns( Columns<MT,SO,DF,SF,I2,Is2...>&& c, RCAs... args )
959 static constexpr
size_t indices[] = { I2, Is2... };
960 return columns< indices[I1], indices[Is1]... >( c.operand(), args... );
987 inline decltype(
auto)
columns( Columns<MT,SO,DF,SF,CCAs...>& c, RCAs... args )
994 static constexpr
size_t indices[] = { I, Is... };
995 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
996 if( c.columns() <= indices[i] ) {
1002 decltype(
auto) indices( c.idces() );
1003 return columns( c.operand(), { indices[I], indices[Is]... }, args... );
1029 ,
typename... RCAs >
1030 inline decltype(
auto)
columns(
const Columns<MT,SO,DF,SF,CCAs...>& c, RCAs... args )
1037 static constexpr
size_t indices[] = { I, Is... };
1038 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
1039 if( c.columns() <= indices[i] ) {
1045 decltype(
auto) indices( c.idces() );
1046 return columns( c.operand(), { indices[I], indices[Is]... }, args... );
1072 ,
typename... RCAs >
1073 inline decltype(
auto)
columns( Columns<MT,SO,DF,SF,CCAs...>&& c, RCAs... args )
1080 static constexpr
size_t indices[] = { I, Is... };
1081 for(
size_t i=0UL; i<
sizeof...(Is)+1UL; ++i ) {
1082 if( c.columns() <= indices[i] ) {
1088 decltype(
auto) indices( c.idces() );
1089 return columns( c.operand(), { indices[I], indices[Is]... }, args... );
1110 template<
typename MT
1116 ,
typename... RCAs >
1117 inline decltype(
auto)
columns( Columns<MT,SO,DF,SF,CCAs...>& c,
const T* indices,
size_t n, RCAs... args )
1124 for(
size_t i=0UL; i<n; ++i ) {
1125 if( c.columns() <= indices[i] ) {
1131 decltype(
auto) oldIndices( c.idces() );
1135 for(
size_t i=0UL; i<n; ++i ) {
1136 newIndices.pushBack( oldIndices[indices[i]] );
1139 return columns( c.operand(), newIndices.data(), newIndices.size(), args... );
1160 template<
typename MT
1166 ,
typename... RCAs >
1167 inline decltype(
auto)
columns(
const Columns<MT,SO,DF,SF,CCAs...>& c,
const T* indices,
size_t n, RCAs... args )
1174 for(
size_t i=0UL; i<n; ++i ) {
1175 if( c.columns() <= indices[i] ) {
1181 decltype(
auto) oldIndices( c.idces() );
1185 for(
size_t i=0UL; i<n; ++i ) {
1186 newIndices.pushBack( oldIndices[indices[i]] );
1189 return columns( c.operand(), newIndices.data(), newIndices.size(), args... );
1210 template<
typename MT
1216 ,
typename... RCAs >
1217 inline decltype(
auto)
columns( Columns<MT,SO,DF,SF,CCAs...>&& c,
const T* indices,
size_t n, RCAs... args )
1224 for(
size_t i=0UL; i<n; ++i ) {
1225 if( c.columns() <= indices[i] ) {
1231 decltype(
auto) oldIndices( c.idces() );
1235 for(
size_t i=0UL; i<n; ++i ) {
1236 newIndices.pushBack( oldIndices[indices[i]] );
1239 return columns( c.operand(), newIndices.data(), newIndices.size(), args... );
1265 template<
size_t... CEAs
1267 ,
typename... REAs >
1272 return (~vector).leftOperand() *
columns<CEAs...>( (~vector).rightOperand(), args... );
1297 template<
size_t... CRAs
1304 ,
typename... RRAs >
1305 inline decltype(
auto)
row( Columns<MT,SO,DF,SF,I,Is...>&
columns, RRAs... args )
1309 return elements<I,Is...>(
row<CRAs...>( columns.operand(), args... ) );
1327 template<
size_t... CRAs
1334 ,
typename... RRAs >
1335 inline decltype(
auto)
row(
const Columns<MT,SO,DF,SF,I,Is...>& columns, RRAs... args )
1339 return elements<I,Is...>(
row<CRAs...>( columns.operand(), args... ) );
1357 template<
size_t... CRAs
1364 ,
typename... RRAs >
1365 inline decltype(
auto)
row( Columns<MT,SO,DF,SF,I,Is...>&& columns, RRAs... args )
1369 return elements<I,Is...>(
row<CRAs...>( columns.operand(), args... ) );
1386 template<
size_t... CRAs
1391 ,
typename... RRAs >
1392 inline decltype(
auto)
row( Columns<MT,SO,DF,SF>& columns, RRAs... args )
1396 return elements( row<CRAs...>( columns.operand(), args... ), columns.idces() );
1414 template<
size_t... CRAs
1419 ,
typename... RRAs >
1420 inline decltype(
auto)
row(
const Columns<MT,SO,DF,SF>& columns, RRAs... args )
1424 return elements( row<CRAs...>( columns.operand(), args... ), columns.idces() );
1442 template<
size_t... CRAs
1447 ,
typename... RRAs >
1448 inline decltype(
auto)
row( Columns<MT,SO,DF,SF>&& columns, RRAs... args )
1452 return elements( row<CRAs...>( columns.operand(), args... ), columns.idces() );
1485 ,
typename... RCAs >
1486 inline decltype(
auto)
column( Columns<MT,SO,DF,SF,I2,Is...>& columns, RCAs... args )
1490 static constexpr
size_t indices[] = { I2, Is... };
1491 return column<indices[I1]>( columns.operand(), args... );
1516 ,
typename... RCAs >
1517 inline decltype(
auto)
column(
const Columns<MT,SO,DF,SF,I2,Is...>& columns, RCAs... args )
1521 static constexpr
size_t indices[] = { I2, Is... };
1522 return column<indices[I1]>( columns.operand(), args... );
1547 ,
typename... RCAs >
1548 inline decltype(
auto)
column( Columns<MT,SO,DF,SF,I2,Is...>&& columns, RCAs... args )
1552 static constexpr
size_t indices[] = { I2, Is... };
1553 return column<indices[I1]>( columns.operand(), args... );
1572 template<
size_t... CCAs1
1578 ,
typename... RCAs >
1579 inline decltype(
auto)
column( Columns<MT,SO,DF,SF,CCAs2...>& columns, RCAs... args )
1584 decltype(
auto) indices( columns.idces() );
1589 if( indices.size() <= cd.column() ) {
1594 return column( columns.operand(), indices[cd.column()], args... );
1613 template<
size_t... CCAs1
1619 ,
typename... RCAs >
1620 inline decltype(
auto)
column(
const Columns<MT,SO,DF,SF,CCAs2...>& columns, RCAs... args )
1625 decltype(
auto) indices( columns.idces() );
1630 if( indices.size() <= cd.column() ) {
1635 return column( columns.operand(), indices[cd.column()], args... );
1654 template<
size_t... CCAs1
1660 ,
typename... RCAs >
1661 inline decltype(
auto)
column( Columns<MT,SO,DF,SF,CCAs2...>&& columns, RCAs... args )
1666 decltype(
auto) indices( columns.idces() );
1671 if( indices.size() <= cd.column() ) {
1676 return column( columns.operand(), indices[cd.column()], args... );
1698 template<
typename MT
1703 inline void reset( Columns<MT,SO,DF,SF,CCAs...>& columns )
1719 template<
typename MT
1724 inline void reset( Columns<MT,SO,DF,SF,CCAs...>&& columns )
1744 template<
typename MT
1749 inline void reset( Columns<MT,SO,DF,SF,CCAs...>& columns,
size_t i )
1767 template<
typename MT
1772 inline void clear( Columns<MT,SO,DF,SF,CCAs...>& columns )
1790 template<
typename MT
1795 inline void clear( Columns<MT,SO,DF,SF,CCAs...>&& columns )
1834 inline bool isDefault(
const Columns<MT,SO,true,SF,CCAs...>& columns )
1839 for(
size_t i=0UL; i<columns.rows(); ++i )
1840 for(
size_t j=0UL; j<columns.columns(); ++j )
1841 if( !isDefault<RF>(
columns(i,j) ) )
1845 for(
size_t j=0UL; j<columns.columns(); ++j )
1846 for(
size_t i=0UL; i<columns.rows(); ++i )
1847 if( !isDefault<RF>(
columns(i,j) ) )
1888 inline bool isDefault(
const Columns<MT,SO,false,SF,CCAs...>& columns )
1892 for(
size_t j=0UL; j<columns.columns(); ++j ) {
1893 for(
auto element=columns.cbegin(j); element!=columns.cend(j); ++element )
1894 if( !isDefault<RF>( element->value() ) )
return false;
1921 template<
typename MT
1926 inline bool isIntact(
const Columns<MT,SO,DF,SF,CCAs...>& columns ) noexcept
1928 return ( columns.rows() == columns.operand().rows() &&
1929 columns.columns() <= columns.operand().columns() &&
1949 template<
typename MT
1957 if( !
isSame( a.operand(), ~b ) || ( a.rows() != (~b).
rows() ) || ( a.columns() != (~b).
columns() ) )
1960 decltype(
auto) indices( a.idces() );
1961 for(
size_t j=0UL; j<a.columns(); ++j ) {
1962 if( indices[j] != j )
1985 template<
typename MT
2012 template<
typename MT
2020 inline bool isSame(
const Columns<MT,SO1,DF,SF,CCAs...>& a,
const Submatrix<MT,AF,SO2,DF,CSAs...>& b ) noexcept
2022 if( !
isSame( a.operand(), b.operand() ) || ( a.rows() != (~b).
rows() ) || ( a.columns() != (~b).
columns() ) )
2025 decltype(
auto) indices( a.idces() );
2026 for(
size_t j=0UL; j<a.columns(); ++j ) {
2027 if( indices[j] != b.column()+j )
2050 template<
typename MT
2058 inline bool isSame(
const Submatrix<MT,AF,SO1,DF,CSAs...>& a,
const Columns<MT,SO2,DF,SF,CCAs...>& b ) noexcept
2079 template<
typename MT
2085 inline bool isSame(
const Columns<MT,SO,DF,SF,CCAs1...>& a,
2086 const Columns<MT,SO,DF,SF,CCAs2...>& b ) noexcept
2088 if( !
isSame( a.operand(), b.operand() ) || a.rows() != b.rows() || a.columns() != b.columns() )
2091 decltype(
auto) indices1( a.idces() );
2092 decltype(
auto) indices2( b.idces() );
2094 return std::equal( indices1.begin(), indices1.end(), indices2.begin() );
2146 using RT =
ResultType_< Columns<MT,SO,
true,SF,CCAs...> >;
2175 template<
typename MT
2181 inline bool trySet(
const Columns<MT,SO,DF,SF,CCAs...>& c,
size_t i,
size_t j,
const ET& value )
2186 return trySet( c.operand(), c.idx(i), j, value );
2208 template<
typename MT
2214 inline bool tryAdd(
const Columns<MT,SO,DF,SF,CCAs...>& c,
size_t i,
size_t j,
const ET& value )
2219 return tryAdd( c.operand(), c.idx(i), j, value );
2241 template<
typename MT
2247 inline bool trySub(
const Columns<MT,SO,DF,SF,CCAs...>& c,
size_t i,
size_t j,
const ET& value )
2252 return trySub( c.operand(), c.idx(i), j, value );
2274 template<
typename MT
2280 inline bool tryMult(
const Columns<MT,SO,DF,SF,CCAs...>& c,
size_t i,
size_t j,
const ET& value )
2285 return tryMult( c.operand(), c.idx(i), j, value );
2309 template<
typename MT
2316 tryMult(
const Columns<MT,SO,DF,SF,CCAs...>& c,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2323 const size_t jend( column + n );
2325 for(
size_t j=column; j<jend; ++j ) {
2326 if( !tryMult( c.operand(),
row, c.idx(j), m, n, value ) )
2352 template<
typename MT
2358 inline bool tryDiv(
const Columns<MT,SO,DF,SF,CCAs...>& c,
size_t i,
size_t j,
const ET& value )
2363 return tryDiv( c.operand(), c.idx(i), j, value );
2387 template<
typename MT
2394 tryDiv(
const Columns<MT,SO,DF,SF,CCAs...>& c,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2401 const size_t jend( column + n );
2403 for(
size_t j=column; j<jend; ++j ) {
2404 if( !tryDiv( c.operand(),
row, c.idx(j), m, n, value ) )
2430 template<
typename MT
2436 inline bool tryAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2443 return tryAssign( lhs.operand(), ~rhs,
row, lhs.idx( column ) );
2465 template<
typename MT
2471 inline bool tryAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2478 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
2479 if( !trySet( lhs.operand(),
row, lhs.idx( column+i ), (~rhs)[i] ) )
2507 template<
typename MT
2514 inline bool tryAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2524 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
2525 if( !trySet( lhs.operand(), row+i, lhs.idx( column+i ), (~rhs)[i] ) )
2551 template<
typename MT1
2558 inline bool tryAssign(
const Columns<MT1,SO1,DF,SF,CCAs...>& lhs,
2566 for(
size_t j=0UL; j<(~rhs).
columns(); ++j ) {
2594 template<
typename MT
2600 inline bool tryAddAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2607 return tryAddAssign( lhs.operand(), ~rhs,
row, lhs.idx( column ) );
2630 template<
typename MT
2636 inline bool tryAddAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2643 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
2644 if( !tryAdd( lhs.operand(),
row, lhs.idx( column+i ), (~rhs)[i] ) )
2672 template<
typename MT
2679 inline bool tryAddAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2689 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
2690 if( !tryAdd( lhs.operand(), row+i, lhs.idx( column+i ), (~rhs)[i] ) )
2716 template<
typename MT1
2723 inline bool tryAddAssign(
const Columns<MT1,SO1,DF,SF,CCAs...>& lhs,
2731 for(
size_t j=0UL; j<(~rhs).
columns(); ++j ) {
2759 template<
typename MT
2765 inline bool trySubAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2772 return trySubAssign( lhs.operand(), ~rhs,
row, lhs.idx( column ) );
2795 template<
typename MT
2801 inline bool trySubAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2808 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
2809 if( !trySub( lhs.operand(),
row, lhs.idx( column+i ), (~rhs)[i] ) )
2837 template<
typename MT
2844 inline bool trySubAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2854 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
2855 if( !trySub( lhs.operand(), row+i, lhs.idx( column+i ), (~rhs)[i] ) )
2882 template<
typename MT1
2889 inline bool trySubAssign(
const Columns<MT1,SO1,DF,SF,CCAs...>& lhs,
2897 for(
size_t j=0UL; j<(~rhs).
columns(); ++j ) {
2925 template<
typename MT
2931 inline bool tryMultAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2938 return tryMultAssign( lhs.operand(), ~rhs,
row, lhs.idx( column ) );
2961 template<
typename MT
2967 inline bool tryMultAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
2974 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
2975 if( !tryMult( lhs.operand(),
row, lhs.idx( column+i ), (~rhs)[i] ) )
3003 template<
typename MT
3010 inline bool tryMultAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
3020 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
3021 if( !tryMult( lhs.operand(), row+i, lhs.idx( column+i ), (~rhs)[i] ) )
3048 template<
typename MT1
3055 inline bool trySchurAssign(
const Columns<MT1,SO1,DF,SF,CCAs...>& lhs,
3063 for(
size_t j=0UL; j<(~rhs).
columns(); ++j ) {
3091 template<
typename MT
3097 inline bool tryDivAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
3104 return tryDivAssign( lhs.operand(), ~rhs,
row, lhs.idx( column ) );
3127 template<
typename MT
3133 inline bool tryDivAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
3140 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
3141 if( !tryDiv( lhs.operand(),
row, lhs.idx( column+i ), (~rhs)[i] ) )
3169 template<
typename MT
3176 inline bool tryDivAssign(
const Columns<MT,SO,DF,SF,CCAs...>& lhs,
3186 for(
size_t i=0UL; i<(~rhs).
size(); ++i ) {
3187 if( !tryDiv( lhs.operand(), row+i, lhs.idx( column+i ), (~rhs)[i] ) )
3212 template<
typename MT
3218 inline decltype(
auto) derestrict( Columns<MT,SO,DF,SF,I,Is...>& c )
3220 return columns<I,Is...>( derestrict( c.operand() ),
unchecked );
3241 template<
typename MT
3247 inline decltype(
auto) derestrict( Columns<MT,SO,DF,SF,I,Is...>&& c )
3249 return columns<I,Is...>( derestrict( c.operand() ),
unchecked );
3270 template<
typename MT
3274 inline decltype(
auto) derestrict( Columns<MT,SO,DF,SF>& c )
3276 decltype(
auto) indices( c.idces() );
3277 return columns( derestrict( c.operand() ), indices.data(), indices.size(),
unchecked );
3298 template<
typename MT
3302 inline decltype(
auto) derestrict( Columns<MT,SO,DF,SF>&& r )
3304 decltype(
auto) indices( r.idces() );
3305 return columns( derestrict( r.operand() ), indices.data(), indices.size(),
unchecked );
3321 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs >
3322 struct Size< Columns<MT,SO,DF,SF,CCAs...>, 0UL >
3323 :
public Size<MT,0UL>
3326 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t I,
size_t... Is >
3327 struct Size< Columns<MT,SO,DF,SF,I,Is...>, 1UL >
3328 :
public PtrdiffT<1UL+sizeof...(Is)>
3344 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs >
3362 template<
typename MT,
bool SO,
bool SF,
size_t... CCAs >
3380 template<
typename MT,
bool SO,
bool SF,
size_t... CCAs >
3398 template<
typename MT,
bool SO,
bool SF,
size_t... CCAs >
3399 struct IsAligned< Columns<MT,SO,true,SF,CCAs...> >
3416 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs,
size_t... CSAs >
3435 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs,
size_t... CRAs >
3436 struct RowTrait< Columns<MT,SO,DF,SF,CCAs...>, CRAs... >
3454 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs,
size_t... CRAs >
3455 struct RowsTrait< Columns<MT,SO,DF,SF,CCAs...>, CRAs... >
3473 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs1,
size_t... CCAs2 >
3474 struct ColumnTrait< Columns<MT,SO,DF,SF,CCAs1...>, CCAs2... >
3492 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs1,
size_t... CCAs2 >
3493 struct ColumnsTrait< Columns<MT,SO,DF,SF,CCAs1...>, CCAs2... >
3511 template<
typename MT,
bool SO,
bool DF,
bool SF,
size_t... CCAs,
ptrdiff_t... CBAs >
3512 struct BandTrait< Columns<MT,SO,DF,SF,CCAs...>, CBAs... >
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
Header file for the blaze::checked and blaze::unchecked instances.
Header file for the implementation of the Columns base template.
Base class for all vector/matrix multiplication expression templates.The TVecMatMultExpr class serves...
Definition: TVecMatMultExpr.h:67
Base class for all binary matrix map expression templates.The MatMatMapExpr class serves as a tag for...
Definition: MatMatMapExpr.h:66
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
Header file for the alignment flag values.
Header file for the UNUSED_PARAMETER function template.
#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
constexpr bool equal(const T1 &a, const T2 &b)
Generic equality check.
Definition: Equal.h:76
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
Header file for the MatTransExpr base class.
Columns specialization for sparse matrices.
Header file for the dense matrix inversion flags.
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
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
Header file for the MatEvalExpr base class.
Header file for the MatMatMultExpr base class.
Header file for the extended initializer_list functionality.
Index sequence type of the Blaze library.
typename SubmatrixTrait< MT, CSAs... >::Type SubmatrixTrait_
Auxiliary alias declaration for the SubmatrixTrait type trait.The SubmatrixTrait_ alias declaration p...
Definition: SubmatrixTrait.h:145
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
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
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
Header file for the matrix storage order types.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:772
Header file for the MatMapExpr base class.
Base template for the RowTrait class.
Definition: RowTrait.h:109
typename ColumnTrait< MT, CCAs... >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:144
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
Columns specialization for dense matrices.
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 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
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
decltype(auto) elements(Vector< VT, TF > &vector, REAs... args)
Creating a view on a selection of elements of the given vector.
Definition: Elements.h:134
Header file for the exception macros of the math module.
Constraint on the data type.
Constraint on the data type.
Header file for the MatSerialExpr base class.
Header file for the VecTVecMultExpr base class.
typename BandTrait< MT, CBAs... >::Type BandTrait_
Auxiliary alias declaration for the BandTrait type trait.The BandTrait_ alias declaration provides a ...
Definition: BandTrait.h:145
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
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.
Header file for all forward declarations for views.
typename EnableIfTrue< Condition, T >::Type EnableIfTrue_
Auxiliary type for the EnableIfTrue class template.The EnableIfTrue_ alias declaration provides a con...
Definition: EnableIf.h:138
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 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
size_t size() const noexcept
Returns the current size/dimension of the small vector.
Definition: SmallVector.h:769
Header file for the column trait.
Header file for the isDefault shim.
void reserve(size_t n)
Setting the minimum capacity of the vector.
Definition: SmallVector.h:895
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.
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: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.
#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.
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.
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
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
Header file for the MatMatMapExpr base class.
Initializer list type of the Blaze library.
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
Header file for the SmallVector implementation.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
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 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
Base template for the BandTrait class.
Definition: BandTrait.h:109
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