101 constexpr MT& operator*() noexcept;
102 constexpr const MT& operator*() const noexcept;
111 Matrix( const Matrix& ) = default;
112 Matrix( Matrix&& ) = default;
114 Matrix& operator=( const Matrix& ) = default;
115 Matrix& operator=( Matrix&& ) = default;
143 return static_cast<MT&
>( *this );
161 return static_cast<const MT&
>( *this );
178 return static_cast<MT&
>( *this );
195 return static_cast<const MT&
>( *this );
228 (*lhs) = std::move( tmp );
252inline VT&
operator*=( Vector<VT,false>&& lhs,
const Matrix<MT,SO>& rhs )
254 return (*lhs) *= (*rhs);
277inline VT&
operator*=( Vector<VT,true>& lhs,
const Matrix<MT,SO>& rhs )
279 ResultType_t<VT> tmp( (*lhs) * (*rhs) );
280 (*lhs) = std::move( tmp );
304inline VT&
operator*=( Vector<VT,true>&& lhs,
const Matrix<MT,SO>& rhs )
306 return (*lhs) *= (*rhs);
325template<
typename MT1
329inline MT1&
operator*=( Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs )
331 ResultType_t<MT1> tmp( (*lhs) * (*rhs) );
332 (*lhs) = std::move( tmp );
353template<
typename MT1
357inline MT1&
operator*=( Matrix<MT1,SO1>&& lhs,
const Matrix<MT2,SO2>& rhs )
359 return (*lhs) *= (*rhs);
376template<
typename MT,
bool SO >
379template<
typename MT,
bool SO >
380const MT&
crtp_cast(
const Matrix<MT,SO>& matrix );
382template<
typename MT,
bool SO >
383typename MT::Iterator
begin( Matrix<MT,SO>& matrix,
size_t i );
385template<
typename MT,
bool SO >
386typename MT::ConstIterator
begin(
const Matrix<MT,SO>& matrix,
size_t i );
388template<
typename MT,
bool SO >
389typename MT::ConstIterator
cbegin(
const Matrix<MT,SO>& matrix,
size_t i );
391template<
typename MT,
bool SO >
392typename MT::Iterator
end( Matrix<MT,SO>& matrix,
size_t i );
394template<
typename MT,
bool SO >
395typename MT::ConstIterator
end(
const Matrix<MT,SO>& matrix,
size_t i );
397template<
typename MT,
bool SO >
398typename MT::ConstIterator
cend(
const Matrix<MT,SO>& matrix,
size_t i );
400template<
typename MT,
bool SO >
401constexpr size_t rows(
const Matrix<MT,SO>& matrix )
noexcept;
403template<
typename MT,
bool SO >
404constexpr size_t columns(
const Matrix<MT,SO>& matrix )
noexcept;
406template<
typename MT,
bool SO >
407constexpr size_t size(
const Matrix<MT,SO>& matrix )
noexcept;
409template<
typename MT,
bool SO >
410size_t capacity(
const Matrix<MT,SO>& matrix )
noexcept;
412template<
typename MT,
bool SO >
413size_t capacity(
const Matrix<MT,SO>& matrix,
size_t i )
noexcept;
415template<
typename MT,
bool SO >
416size_t nonZeros(
const Matrix<MT,SO>& matrix );
418template<
typename MT,
bool SO >
419size_t nonZeros(
const Matrix<MT,SO>& matrix,
size_t i );
421template<
typename MT,
bool SO >
422constexpr void reset( Matrix<MT,SO>& matrix );
424template<
typename MT,
bool SO >
425constexpr void reset( Matrix<MT,SO>&& matrix );
427template<
typename MT,
bool SO >
428constexpr void reset( Matrix<MT,SO>& matrix,
size_t i );
430template<
typename MT,
bool SO >
431constexpr void reset( Matrix<MT,SO>&& matrix,
size_t i );
433template<
typename MT,
bool SO >
434constexpr void clear( Matrix<MT,SO>& matrix );
436template<
typename MT,
bool SO >
437constexpr void clear( Matrix<MT,SO>&& matrix );
439template<
typename MT,
bool SO >
440void resize( Matrix<MT,SO>& matrix,
size_t rows,
size_t columns,
bool preserve=
true );
442template<
typename MT,
bool SO >
445template<
typename MT,
bool SO >
448template<
typename MT,
bool SO >
451template<
typename MT,
bool SO >
452typename MT::ResultType
evaluate(
const Matrix<MT,SO>& matrix );
454template<
bool B,
typename MT,
bool SO >
455typename MT::ResultType
evaluateIf(
const Matrix<MT,SO>& matrix );
457template<
typename MT,
bool SO >
458constexpr bool isEmpty(
const Matrix<MT,SO>& matrix )
noexcept;
460template<
typename MT,
bool SO >
461bool isSquare(
const Matrix<MT,SO>& matrix )
noexcept;
463template<
typename MT1,
bool SO1,
typename MT2,
bool SO2 >
464bool isSame(
const Matrix<MT1,SO1>& a,
const Matrix<MT2,SO2>& b )
noexcept;
520 return (*matrix).begin(i);
542 return (*matrix).begin(i);
564 return (*matrix).cbegin(i);
586 return (*matrix).end(i);
608 return (*matrix).end(i);
630 return (*matrix).cend(i);
646 return (*matrix).rows();
662 return (*matrix).columns();
678 return (*matrix).rows() * (*matrix).columns();
694 return (*matrix).capacity();
716 return (*matrix).capacity( i );
732 return (*matrix).nonZeros();
754 return (*matrix).nonZeros( i );
769constexpr auto reset_backend( Matrix<MT,SO>& matrix )
788constexpr auto reset_backend( Matrix<MT,SO>& matrix )
808 reset_backend( *matrix );
824 reset_backend( *matrix );
840constexpr auto reset_backend( Matrix<MT,SO>& matrix,
size_t i )
843 (*matrix).reset( i );
860constexpr auto reset_backend( Matrix<MT,SO>& matrix,
size_t i )
886 reset_backend( *matrix, i );
908 reset_backend( *matrix, i );
923constexpr auto clear_backend( Matrix<MT,SO>& matrix )
942constexpr auto clear_backend( Matrix<MT,SO>& matrix )
962 clear_backend( *matrix );
978 clear_backend( *matrix );
1000template<
typename MT
1002BLAZE_ALWAYS_INLINE auto resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
1007 if( (*matrix).rows() != m || (*matrix).columns() != n ) {
1028template<
typename MT
1030BLAZE_ALWAYS_INLINE auto resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
1033 (*matrix).resize( m, n, preserve );
1053template<
typename MT
1055BLAZE_ALWAYS_INLINE auto resize_backend( Matrix<MT,SO>& matrix,
size_t m,
size_t n,
bool preserve )
1062 (*matrix).resize( m, preserve );
1106template<
typename MT
1110 resize_backend( matrix, m, n, preserve );
1123template<
typename MT
1142template<
typename MT
1147 (*matrix).shrinkToFit();
1167template<
typename MT
1171 shrinkToFit_backend( matrix );
1193template<
typename MT
1197 (*matrix).transpose();
1219template<
typename MT
1223 (*matrix).ctranspose();
1280template<
typename MT
1284 typename MT::ResultType tmp( *matrix );
1301template<
typename MT
1321template<
typename MT
1362template<
typename MT
1366 return size( *matrix ) == 0UL;
1381template<
typename MT
1385 return (
IsSquare_v<MT> || (*matrix).rows() == (*matrix).columns() );
1420template<
typename MT1
1427 reinterpret_cast<const void*
>( &a ) ==
reinterpret_cast<const void*
>( &b ) );
1441template<
typename MT1
1448 (*lhs).assign( *rhs );
1463template<
typename MT1
1473 (*lhs).assign( *rhs );
1489template<
typename MT1
1499 (*lhs).assign(
trans( *rhs ) );
1520template<
typename MT1
1531 assign_backend( *lhs, *rhs );
1547template<
typename MT1
1550BLAZE_ALWAYS_INLINE void addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,SO>& rhs )
1554 (*lhs).addAssign( *rhs );
1570template<
typename MT1
1573BLAZE_ALWAYS_INLINE auto addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
1580 (*lhs).addAssign( *rhs );
1596template<
typename MT1
1599BLAZE_ALWAYS_INLINE auto addAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
1606 (*lhs).addAssign(
trans( *rhs ) );
1627template<
typename MT1
1638 addAssign_backend( *lhs, *rhs );
1654template<
typename MT1
1657BLAZE_ALWAYS_INLINE void subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,SO>& rhs )
1661 (*lhs).subAssign( *rhs );
1677template<
typename MT1
1680BLAZE_ALWAYS_INLINE auto subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
1687 (*lhs).subAssign( *rhs );
1703template<
typename MT1
1706BLAZE_ALWAYS_INLINE auto subAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
1713 (*lhs).subAssign(
trans( *rhs ) );
1734template<
typename MT1
1745 subAssign_backend( *lhs, *rhs );
1761template<
typename MT1
1764BLAZE_ALWAYS_INLINE void schurAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,SO>& rhs )
1768 (*lhs).schurAssign( *rhs );
1784template<
typename MT1
1787BLAZE_ALWAYS_INLINE auto schurAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
1794 (*lhs).schurAssign( *rhs );
1810template<
typename MT1
1813BLAZE_ALWAYS_INLINE auto schurAssign_backend( Matrix<MT1,SO>& lhs,
const Matrix<MT2,!SO>& rhs )
1820 (*lhs).schurAssign(
trans( *rhs ) );
1841template<
typename MT1
1852 schurAssign_backend( *lhs, *rhs );
1873template<
typename MT1
1883 (*lhs).multAssign( *rhs );
1905template<
typename MT
1908BLAZE_ALWAYS_INLINE bool trySet(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
1939template<
typename MT
1943 trySet(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
1974template<
typename MT
1977BLAZE_ALWAYS_INLINE bool tryAdd(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
2008template<
typename MT
2012 tryAdd(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2043template<
typename MT
2046BLAZE_ALWAYS_INLINE bool trySub(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
2077template<
typename MT
2081 trySub(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2112template<
typename MT
2115BLAZE_ALWAYS_INLINE bool tryMult(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
2146template<
typename MT
2150 tryMult(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2181template<
typename MT
2184BLAZE_ALWAYS_INLINE bool tryDiv(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
2215template<
typename MT
2219 tryDiv(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2250template<
typename MT
2252BLAZE_ALWAYS_INLINE bool tryShift(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
int count )
2283template<
typename MT
2286 tryShift(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
int count )
2317template<
typename MT
2320BLAZE_ALWAYS_INLINE bool tryBitand(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
2351template<
typename MT
2355 tryBitand(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2386template<
typename MT
2389BLAZE_ALWAYS_INLINE bool tryBitor(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
2420template<
typename MT
2424 tryBitor(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2455template<
typename MT
2458BLAZE_ALWAYS_INLINE bool tryBitxor(
const Matrix<MT,SO>& mat,
size_t i,
size_t j,
const ET& value )
2489template<
typename MT
2493 tryBitxor(
const Matrix<MT,SO>& mat,
size_t row,
size_t column,
size_t m,
size_t n,
const ET& value )
2524template<
typename MT
2561template<
typename MT
2597template<
typename MT1
2601BLAZE_ALWAYS_INLINE bool tryAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
2633template<
typename MT
2670template<
typename MT
2706template<
typename MT1
2710BLAZE_ALWAYS_INLINE bool tryAddAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
2742template<
typename MT
2780template<
typename MT
2816template<
typename MT1
2820BLAZE_ALWAYS_INLINE bool trySubAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
2852template<
typename MT
2856BLAZE_ALWAYS_INLINE bool tryMultAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
2890template<
typename MT
2894BLAZE_ALWAYS_INLINE bool tryMultAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
2926template<
typename MT1
2930BLAZE_ALWAYS_INLINE bool trySchurAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
2962template<
typename MT
3000template<
typename MT
3036template<
typename MT
3040BLAZE_ALWAYS_INLINE bool tryShiftAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3073template<
typename MT
3077BLAZE_ALWAYS_INLINE bool tryShiftAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3109template<
typename MT1
3113BLAZE_ALWAYS_INLINE bool tryShiftAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
3145template<
typename MT
3149BLAZE_ALWAYS_INLINE bool tryBitandAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3183template<
typename MT
3187BLAZE_ALWAYS_INLINE bool tryBitandAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3219template<
typename MT1
3223BLAZE_ALWAYS_INLINE bool tryBitandAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
3255template<
typename MT
3259BLAZE_ALWAYS_INLINE bool tryBitorAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3293template<
typename MT
3297BLAZE_ALWAYS_INLINE bool tryBitorAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3329template<
typename MT1
3333BLAZE_ALWAYS_INLINE bool tryBitorAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
3365template<
typename MT
3369BLAZE_ALWAYS_INLINE bool tryBitxorAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3403template<
typename MT
3407BLAZE_ALWAYS_INLINE bool tryBitxorAssign(
const Matrix<MT,SO>& lhs,
const Vector<VT,TF>& rhs,
3439template<
typename MT1
3443BLAZE_ALWAYS_INLINE bool tryBitxorAssign(
const Matrix<MT1,SO1>& lhs,
const Matrix<MT2,SO2>& rhs,
3474template<
typename MT
3498template<
typename MT
3522template<
typename MT