35 #ifndef _BLAZE_MATH_DENSE_DENSEMATRIX_H_ 36 #define _BLAZE_MATH_DENSE_DENSEMATRIX_H_ 94 template<
typename T1,
typename T2 >
95 auto operator==(
const DenseMatrix<T1,false>& mat, T2 scalar )
96 -> EnableIf_t< IsNumeric_v<T2>,
bool >;
98 template<
typename T1,
typename T2 >
99 auto operator==(
const DenseMatrix<T1,true>& mat, T2 scalar )
100 -> EnableIf_t< IsNumeric_v<T2>,
bool >;
102 template<
typename T1,
typename T2,
bool SO >
103 auto operator==( T1 scalar,
const DenseMatrix<T2,SO>& mat )
104 -> EnableIf_t< IsNumeric_v<T2>,
bool >;
106 template<
typename T1,
typename T2,
bool SO >
107 auto operator!=(
const DenseMatrix<T1,SO>& mat, T2 scalar )
108 -> EnableIf_t< IsNumeric_v<T2>,
bool >;
110 template<
typename T1,
typename T2,
bool SO >
111 auto operator!=( T1 scalar,
const DenseMatrix<T2,SO>& mat )
112 -> EnableIf_t< IsNumeric_v<T2>,
bool >;
114 template<
typename MT,
bool SO,
typename ST >
115 auto operator+=( DenseMatrix<MT,SO>& mat, ST scalar )
116 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
118 template<
typename MT,
bool SO,
typename ST >
119 auto operator+=( DenseMatrix<MT,SO>&& mat, ST scalar )
120 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
122 template<
typename MT,
bool SO,
typename ST >
123 auto operator-=( DenseMatrix<MT,SO>& mat, ST scalar )
124 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
126 template<
typename MT,
bool SO,
typename ST >
127 auto operator-=( DenseMatrix<MT,SO>&& mat, ST scalar )
128 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
130 template<
typename MT,
bool SO,
typename ST >
131 auto operator*=( DenseMatrix<MT,SO>& mat, ST scalar )
132 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
134 template<
typename MT,
bool SO,
typename ST >
135 auto operator*=( DenseMatrix<MT,SO>&& mat, ST scalar )
136 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
138 template<
typename MT,
bool SO,
typename ST >
139 auto operator/=( DenseMatrix<MT,SO>& mat, ST scalar )
140 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
142 template<
typename MT,
bool SO,
typename ST >
143 auto operator/=( DenseMatrix<MT,SO>&& mat, ST scalar )
144 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
146 template<
typename MT,
bool SO >
147 MT&
operator<<=( DenseMatrix<MT,SO>& mat,
int count );
149 template<
typename MT,
bool SO >
150 MT&
operator<<=( DenseMatrix<MT,SO>&& mat,
int count );
152 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
153 MT1&
operator<<=( DenseMatrix<MT1,SO1>& lhs,
const DenseMatrix<MT2,SO2>& rhs );
155 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
156 MT1&
operator<<=( DenseMatrix<MT1,SO1>&& lhs,
const DenseMatrix<MT2,SO2>& rhs );
158 template<
typename MT,
bool SO >
159 MT&
operator>>=( DenseMatrix<MT,SO>& mat,
int count );
161 template<
typename MT,
bool SO >
162 MT&
operator>>=( DenseMatrix<MT,SO>&& mat,
int count );
164 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
165 MT1&
operator>>=( DenseMatrix<MT1,SO1>& lhs,
const DenseMatrix<MT2,SO2>& rhs );
167 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
168 MT1&
operator>>=( DenseMatrix<MT1,SO1>&& lhs,
const DenseMatrix<MT2,SO2>& rhs );
170 template<
typename MT,
bool SO,
typename ST >
171 auto operator&=( DenseMatrix<MT,SO>& mat, ST scalar )
172 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
174 template<
typename MT,
bool SO,
typename ST >
175 auto operator&=( DenseMatrix<MT,SO>&& mat, ST scalar )
176 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
178 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
179 MT1&
operator&=( DenseMatrix<MT1,SO1>& lhs,
const DenseMatrix<MT2,SO2>& rhs );
181 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
182 MT1&
operator&=( DenseMatrix<MT1,SO1>&& lhs,
const DenseMatrix<MT2,SO2>& rhs );
184 template<
typename MT,
bool SO,
typename ST >
185 auto operator|=( DenseMatrix<MT,SO>& mat, ST scalar )
186 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
188 template<
typename MT,
bool SO,
typename ST >
189 auto operator|=( DenseMatrix<MT,SO>&& mat, ST scalar )
190 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
192 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
193 MT1&
operator|=( DenseMatrix<MT1,SO1>& lhs,
const DenseMatrix<MT2,SO2>& rhs );
195 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
196 MT1&
operator|=( DenseMatrix<MT1,SO1>&& lhs,
const DenseMatrix<MT2,SO2>& rhs );
198 template<
typename MT,
bool SO,
typename ST >
199 auto operator^=( DenseMatrix<MT,SO>& mat, ST scalar )
200 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
202 template<
typename MT,
bool SO,
typename ST >
203 auto operator^=( DenseMatrix<MT,SO>&& mat, ST scalar )
204 -> EnableIf_t< IsNumeric_v<ST>, MT& >;
206 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
207 MT1&
operator^=( DenseMatrix<MT1,SO1>& lhs,
const DenseMatrix<MT2,SO2>& rhs );
209 template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
210 MT1&
operator^=( DenseMatrix<MT1,SO1>&& lhs,
const DenseMatrix<MT2,SO2>& rhs );
227 template<
typename T1
239 for(
size_t i=0; i<A.rows(); ++i ) {
240 for(
size_t j=0; j<A.columns(); ++j ) {
241 if( !
equal( A(i,j), scalar ) )
return false;
262 template<
typename T1
274 for(
size_t j=0; j<A.columns(); ++j ) {
275 for(
size_t i=0; i<A.rows(); ++i ) {
276 if( !
equal( A(i,j), scalar ) )
return false;
297 template<
typename T1
303 return ( mat == scalar );
320 template<
typename T1
326 return !( mat == scalar );
343 template<
typename T1
349 return !( mat == scalar );
367 template<
typename MT
375 if( IsRestricted_v<MT> ) {
376 if( !tryAdd( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), scalar ) ) {
381 decltype(
auto) left( derestrict( ~mat ) );
405 template<
typename MT
429 template<
typename MT
437 if( IsRestricted_v<MT> ) {
438 if( !trySub( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), scalar ) ) {
443 decltype(
auto) left( derestrict( ~mat ) );
467 template<
typename MT
491 template<
typename MT
499 if( IsRestricted_v<MT> ) {
500 if( !tryMult( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), scalar ) ) {
505 decltype(
auto) left( derestrict( ~mat ) );
529 template<
typename MT
555 template<
typename MT
565 if( IsRestricted_v<MT> ) {
566 if( !tryDiv( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), scalar ) ) {
571 decltype(
auto) left( derestrict( ~mat ) );
597 template<
typename MT
620 template<
typename MT
626 if( IsRestricted_v<MT> ) {
627 if( !tryShift( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), count ) ) {
632 decltype(
auto) left( derestrict( ~mat ) );
655 template<
typename MT
676 template<
typename MT1
682 if( IsRestricted_v<MT1> ) {
683 if( !tryShiftAssign( ~lhs, ~rhs, 0UL, 0UL ) ) {
688 decltype(
auto) left( derestrict( ~lhs ) );
711 template<
typename MT1
734 template<
typename MT
740 if( IsRestricted_v<MT> ) {
741 if( !tryShift( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), count ) ) {
746 decltype(
auto) left( derestrict( ~mat ) );
769 template<
typename MT
790 template<
typename MT1
796 if( IsRestricted_v<MT1> ) {
797 if( !tryShiftAssign( ~lhs, ~rhs, 0UL, 0UL ) ) {
802 decltype(
auto) left( derestrict( ~lhs ) );
825 template<
typename MT1
848 template<
typename MT
856 if( IsRestricted_v<MT> ) {
857 if( !tryBitand( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), scalar ) ) {
862 decltype(
auto) left( derestrict( ~mat ) );
886 template<
typename MT
909 template<
typename MT1
915 if( IsRestricted_v<MT1> ) {
916 if( !tryBitandAssign( ~lhs, ~rhs, 0UL, 0UL ) ) {
921 decltype(
auto) left( derestrict( ~lhs ) );
944 template<
typename MT1
967 template<
typename MT
975 if( IsRestricted_v<MT> ) {
976 if( !tryBitor( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), scalar ) ) {
981 decltype(
auto) left( derestrict( ~mat ) );
1005 template<
typename MT
1028 template<
typename MT1
1034 if( IsRestricted_v<MT1> ) {
1035 if( !tryBitorAssign( ~lhs, ~rhs, 0UL, 0UL ) ) {
1040 decltype(
auto) left( derestrict( ~lhs ) );
1063 template<
typename MT1
1086 template<
typename MT
1094 if( IsRestricted_v<MT> ) {
1095 if( !tryBitxor( ~mat, 0UL, 0UL, (~mat).
rows(), (~mat).
columns(), scalar ) ) {
1100 decltype(
auto) left( derestrict( ~mat ) );
1124 template<
typename MT
1147 template<
typename MT1
1153 if( IsRestricted_v<MT1> ) {
1154 if( !tryBitxorAssign( ~lhs, ~rhs, 0UL, 0UL ) ) {
1159 decltype(
auto) left( derestrict( ~lhs ) );
1182 template<
typename MT1
1204 template<
typename MT,
bool SO >
1205 bool isnan(
const DenseMatrix<MT,SO>& dm );
1207 template<
bool RF,
typename MT,
bool SO >
1210 template<
bool RF,
typename MT,
bool SO >
1213 template<
bool RF,
typename MT,
bool SO >
1214 bool isUniform(
const DenseMatrix<MT,SO>& dm );
1216 template<
bool RF,
typename MT,
bool SO >
1217 bool isZero(
const DenseMatrix<MT,SO>& dm );
1219 template<
bool RF,
typename MT,
bool SO >
1220 bool isLower(
const DenseMatrix<MT,SO>& dm );
1222 template<
bool RF,
typename MT,
bool SO >
1223 bool isUniLower(
const DenseMatrix<MT,SO>& dm );
1225 template<
bool RF,
typename MT,
bool SO >
1228 template<
bool RF,
typename MT,
bool SO >
1229 bool isUpper(
const DenseMatrix<MT,SO>& dm );
1231 template<
bool RF,
typename MT,
bool SO >
1232 bool isUniUpper(
const DenseMatrix<MT,SO>& dm );
1234 template<
bool RF,
typename MT,
bool SO >
1237 template<
bool RF,
typename MT,
bool SO >
1238 bool isDiagonal(
const DenseMatrix<MT,SO>& dm );
1240 template<
bool RF,
typename MT,
bool SO >
1241 bool isIdentity(
const DenseMatrix<MT,SO>& dm );
1266 template<
typename MT
1275 for(
size_t i=0UL; i<A.rows(); ++i ) {
1276 for(
size_t j=0UL; j<A.columns(); ++j )
1277 if(
isnan( A(i,j) ) )
return true;
1281 for(
size_t j=0UL; j<A.columns(); ++j ) {
1282 for(
size_t i=0UL; i<A.rows(); ++i )
1283 if(
isnan( A(i,j) ) )
return true;
1332 if( IsSymmetric_v<MT> )
1338 if( IsUniform_v<MT> || (~dm).
rows() < 2UL )
1341 if( IsTriangular_v<MT> )
1347 for(
size_t i=1UL; i<A.rows(); ++i ) {
1348 for(
size_t j=0UL; j<i; ++j ) {
1349 if( !equal<RF>( A(i,j), A(j,i) ) )
1355 for(
size_t j=1UL; j<A.columns(); ++j ) {
1356 for(
size_t i=0UL; i<j; ++i ) {
1357 if( !equal<RF>( A(i,j), A(j,i) ) )
1411 if( IsHermitian_v<MT> )
1414 if( !IsNumeric_v<ET> || !
isSquare( ~dm ) )
1417 if( IsBuiltin_v<ET> && IsUniform_v<MT> )
1423 for(
size_t i=0UL; i<A.rows(); ++i ) {
1424 for(
size_t j=0UL; j<i; ++j ) {
1425 if( !equal<RF>( A(i,j),
conj( A(j,i) ) ) )
1428 if( !isReal<RF>( A(i,i) ) )
1433 for(
size_t j=0UL; j<A.columns(); ++j ) {
1434 for(
size_t i=0UL; i<j; ++i ) {
1435 if( !equal<RF>( A(i,j),
conj( A(j,i) ) ) )
1438 if( !isReal<RF>( A(j,j) ) )
1458 bool isUniform_backend(
const DenseMatrix<MT,false>& dm,
TrueType )
1466 const size_t ibegin( ( IsStrictlyLower_v<MT> )?( 1UL ):( 0UL ) );
1467 const size_t iend ( ( IsStrictlyUpper_v<MT> )?( (~dm).
rows()-1UL ):( (~dm).
rows() ) );
1469 for(
size_t i=ibegin; i<iend; ++i ) {
1470 if( !IsUpper_v<MT> ) {
1471 for(
size_t j=0UL; j<i; ++j ) {
1472 if( !isDefault<RF>( (~dm)(i,j) ) )
1476 if( !isDefault<RF>( (~dm)(i,i) ) )
1478 if( !IsLower_v<MT> ) {
1479 for(
size_t j=i+1UL; j<(~dm).
columns(); ++j ) {
1480 if( !isDefault<RF>( (~dm)(i,j) ) )
1502 bool isUniform_backend(
const DenseMatrix<MT,true>& dm,
TrueType )
1510 const size_t jbegin( ( IsStrictlyUpper_v<MT> )?( 1UL ):( 0UL ) );
1511 const size_t jend ( ( IsStrictlyLower_v<MT> )?( (~dm).
columns()-1UL ):( (~dm).
columns() ) );
1513 for(
size_t j=jbegin; j<jend; ++j ) {
1514 if( !IsLower_v<MT> ) {
1515 for(
size_t i=0UL; i<j; ++i ) {
1516 if( !isDefault<RF>( (~dm)(i,j) ) )
1520 if( !isDefault<RF>( (~dm)(j,j) ) )
1522 if( !IsUpper_v<MT> ) {
1523 for(
size_t i=j+1UL; i<(~dm).
rows(); ++i ) {
1524 if( !isDefault<RF>( (~dm)(i,j) ) )
1546 bool isUniform_backend(
const DenseMatrix<MT,false>& dm,
FalseType )
1554 const auto& cmp( (~dm)(0UL,0UL) );
1556 for(
size_t i=0UL; i<(~dm).
rows(); ++i ) {
1557 for(
size_t j=0UL; j<(~dm).
columns(); ++j ) {
1558 if( !equal<RF>( (~dm)(i,j), cmp ) )
1579 bool isUniform_backend(
const DenseMatrix<MT,true>& dm,
FalseType )
1587 const auto& cmp( (~dm)(0UL,0UL) );
1589 for(
size_t j=0UL; j<(~dm).
columns(); ++j ) {
1590 for(
size_t i=0UL; i<(~dm).
rows(); ++i ) {
1591 if( !equal<RF>( (~dm)(i,j), cmp ) )
1640 if( IsUniform_v<MT> ||
1642 ( (~dm).
rows() == 1UL && (~dm).
columns() == 1UL ) )
1645 if( IsUniTriangular_v<MT> )
1693 const size_t M( (~dm).
rows() );
1694 const size_t N( (~dm).
columns() );
1696 if( IsZero_v<MT> || M == 0UL || N == 0UL )
1699 if( IsUniTriangular_v<MT> )
1702 if( IsUniform_v<MT> )
1703 return isZero<RF>( (~dm)(0UL,0UL) );
1709 for(
size_t i=0UL; i<M; ++i )
1711 const size_t jbegin( IsUpper_v<MT>
1712 ? ( IsStrictlyUpper_v<MT> ? i+1UL : i )
1714 const size_t jend ( IsLower_v<MT> || IsSymmetric_v<MT> || IsHermitian_v<MT>
1715 ? ( IsStrictlyLower_v<MT> ? i : i+1UL )
1718 for(
size_t j=jbegin; j<jend; ++j ) {
1719 if( !isZero<RF>( A(i,j) ) )
1726 for(
size_t j=0UL; j<N; ++j )
1728 const size_t ibegin( IsLower_v<MT>
1729 ? ( IsStrictlyLower_v<MT> ? j+1UL : j )
1731 const size_t iend ( IsUpper_v<MT> || IsSymmetric_v<MT> || IsHermitian_v<MT>
1732 ? ( IsStrictlyUpper_v<MT> ? j : j+1UL )
1735 for(
size_t i=ibegin; i<iend; ++i ) {
1736 if( !isZero<RF>( A(i,j) ) )
1806 if( IsZero_v<MT> || (~dm).
rows() < 2UL )
1811 if( IsUniform_v<MT> )
1812 return isDefault<RF>( A(0UL,0UL) );
1815 for(
size_t i=0UL; i<A.rows()-1UL; ++i ) {
1816 for(
size_t j=i+1UL; j<A.columns(); ++j ) {
1817 if( !isDefault<RF>( A(i,j) ) )
1823 for(
size_t j=1UL; j<A.columns(); ++j ) {
1824 for(
size_t i=0UL; i<j; ++i ) {
1825 if( !isDefault<RF>( A(i,j) ) )
1888 if( IsUniLower_v<MT> )
1897 for(
size_t i=0UL; i<A.rows(); ++i ) {
1898 if( !isOne<RF>( A(i,i) ) )
1900 for(
size_t j=i+1UL; j<A.columns(); ++j ) {
1901 if( !isZero<RF>( A(i,j) ) )
1907 for(
size_t j=0UL; j<A.columns(); ++j ) {
1908 for(
size_t i=0UL; i<j; ++i ) {
1909 if( !isZero<RF>( A(i,j) ) )
1912 if( !isOne<RF>( A(j,j) ) )
1975 if( IsStrictlyLower_v<MT> )
1981 if( IsZero_v<MT> || (~dm).
rows() < 2UL )
1984 if( IsUniLower_v<MT> || IsUniUpper_v<MT> )
1989 if( IsUniform_v<MT> )
1990 return isDefault<RF>( A(0UL,0UL) );
1993 for(
size_t i=0UL; i<A.rows(); ++i ) {
1994 for(
size_t j=i; j<A.columns(); ++j ) {
1995 if( !isDefault<RF>( A(i,j) ) )
2001 for(
size_t j=0UL; j<A.columns(); ++j ) {
2002 for(
size_t i=0UL; i<=j; ++i ) {
2003 if( !isDefault<RF>( A(i,j) ) )
2073 if( IsZero_v<MT> || (~dm).
rows() < 2UL )
2078 if( IsUniform_v<MT> )
2079 return isDefault<RF>( A(0UL,0UL) );
2082 for(
size_t i=1UL; i<A.rows(); ++i ) {
2083 for(
size_t j=0UL; j<i; ++j ) {
2084 if( !isDefault<RF>( A(i,j) ) )
2090 for(
size_t j=0UL; j<A.columns()-1UL; ++j ) {
2091 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
2092 if( !isDefault<RF>( A(i,j) ) )
2155 if( IsUniUpper_v<MT> )
2164 for(
size_t i=0UL; i<A.rows(); ++i ) {
2165 for(
size_t j=0UL; j<i; ++j ) {
2166 if( !isZero<RF>( A(i,j) ) )
2169 if( !isOne<RF>( A(i,i) ) )
2174 for(
size_t j=0UL; j<A.columns(); ++j ) {
2175 if( !isOne<RF>( A(j,j) ) )
2177 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
2178 if( !isZero<RF>( A(i,j) ) )
2242 if( IsStrictlyUpper_v<MT> )
2248 if( IsZero_v<MT> || (~dm).
rows() < 2UL )
2251 if( IsUniLower_v<MT> || IsUniUpper_v<MT> )
2256 if( IsUniform_v<MT> )
2257 return isDefault<RF>( A(0UL,0UL) );
2260 for(
size_t i=0UL; i<A.rows(); ++i ) {
2261 for(
size_t j=0UL; j<=i; ++j ) {
2262 if( !isDefault<RF>( A(i,j) ) )
2268 for(
size_t j=0UL; j<A.columns(); ++j ) {
2269 for(
size_t i=j; i<A.rows(); ++i ) {
2270 if( !isDefault<RF>( A(i,j) ) )
2335 if( IsDiagonal_v<MT> )
2341 if( IsZero_v<MT> || (~dm).
rows() < 2UL )
2346 if( IsUniform_v<MT> )
2347 return isDefault<RF>( A(0UL,0UL) );
2350 for(
size_t i=0UL; i<A.rows(); ++i ) {
2351 if( !IsUpper_v<MT> ) {
2352 for(
size_t j=0UL; j<i; ++j ) {
2353 if( !isDefault<RF>( A(i,j) ) )
2357 if( !IsLower_v<MT> ) {
2358 for(
size_t j=i+1UL; j<A.columns(); ++j ) {
2359 if( !isDefault<RF>( A(i,j) ) )
2366 for(
size_t j=0UL; j<A.columns(); ++j ) {
2367 if( !IsLower_v<MT> ) {
2368 for(
size_t i=0UL; i<j; ++i ) {
2369 if( !isDefault<RF>( A(i,j) ) )
2373 if( !IsUpper_v<MT> ) {
2374 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
2375 if( !isDefault<RF>( A(i,j) ) )
2440 if( IsIdentity_v<MT> )
2446 if( (~dm).
rows() == 0UL )
2452 for(
size_t i=0UL; i<A.rows(); ++i ) {
2453 if( !IsUpper_v<MT> ) {
2454 for(
size_t j=0UL; j<i; ++j ) {
2455 if( !isZero<RF>( A(i,j) ) )
2459 if( !IsUniLower_v<MT> && !IsUniUpper_v<MT> && !isOne<RF>( A(i,i) ) ) {
2462 if( !IsLower_v<MT> ) {
2463 for(
size_t j=i+1UL; j<A.columns(); ++j ) {
2464 if( !isZero<RF>( A(i,j) ) )
2471 for(
size_t j=0UL; j<A.columns(); ++j ) {
2472 if( !IsLower_v<MT> ) {
2473 for(
size_t i=0UL; i<j; ++i ) {
2474 if( !isZero<RF>( A(i,j) ) )
2478 if( !IsUniLower_v<MT> && !IsUniUpper_v<MT> && !isOne<RF>( A(j,j) ) ) {
2481 if( !IsUpper_v<MT> ) {
2482 for(
size_t i=j+1UL; i<A.rows(); ++i ) {
2483 if( !isZero<RF>( A(i,j) ) )
#define BLAZE_CONSTRAINT_MUST_BE_TRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a lower or upper triangular matrix t...
Definition: Triangular.h:61
Header file for the isnan shim.
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: IntegralConstant.h:121
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for auxiliary alias declarations.
Header file for the blaze::checked and blaze::unchecked instances.
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:432
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
#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 IsUniUpper type trait.
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:86
Header file for basic type definitions.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper triangular matrix type,...
Definition: Triangular.h:81
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
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 isZero shim.
Header file for the IsDiagonal type trait.
auto operator^=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Bitwise XOR assignment operator for the bitwise XOR of a dense matrix and a scalar value.
Definition: DenseMatrix.h:1089
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1881
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper unitriangular matrix ty...
Definition: UniTriangular.h:81
Header file for the IsIdentity type trait.
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:2328
auto operator&=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Bitwise AND assignment operator for the bitwise AND of a dense matrix and a scalar value.
Definition: DenseMatrix.h:851
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
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
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 rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:2433
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:677
Header file for the matrix storage order types.
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
Constraint on the data type.
MT & operator<<=(DenseMatrix< MT, SO > &mat, int count)
Left-shift assignment operator for the uniform left-shift of a dense matrix.
Definition: DenseMatrix.h:622
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
Header file for the If class template.
Header file for the DenseMatrix base class.
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:370
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:253
Header file for the IsLower type trait.
Header file for the equal shim.
Header file for the IsUniTriangular type trait.
Header file for the IsTriangular type trait.
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:717
bool isUniform(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a uniform matrix.
Definition: DenseMatrix.h:1638
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:293
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the isOne shim.
Header file for the conjugate shim.
Constraint on the data type.
Header file for the IsNumeric type trait.
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( ).
Definition: DenseMatrix.h:558
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:2235
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
Header file for the IsZero type trait.
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:1406
Header file for the isDefault shim.
auto smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:100
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
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
auto operator|=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Bitwise OR assignment operator for the bitwise OR of a dense matrix and a scalar value.
Definition: DenseMatrix.h:970
Header file for the IsBuiltin type trait.
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
auto operator *=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:494
Header file for the IsUpper type trait.
MT & operator>>=(DenseMatrix< MT, SO > &mat, int count)
Right-shift assignment operator for the uniform right-shift of a dense matrix.
Definition: DenseMatrix.h:736
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1324
Header file for the IsHermitian type trait.
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:951
Header file for the IsRestricted type trait.
Header file for the isReal shim.
#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
bool equal(const SharedValue< T1 > &lhs, const SharedValue< T2 > &rhs)
Equality check for a two shared values.
Definition: SharedValue.h:342
Header file for the reduction flags.
Header file for the IsExpression type trait class.