35#ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
36#define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
113template< RelaxationFlag RF,
typename MT,
bool SO,
bool DF >
116template<
typename MT,
bool SO,
bool DF >
119template<
typename MT,
bool SO,
bool DF >
159 return m.rows() == 0UL;
279 return ( m == 0UL ) ||
310 return trySet( mat, i, j, value );
341 return trySet( mat,
row,
column, m, n, value );
370 return trySet( mat, i, j, value );
402 return trySet( mat,
row,
column, m, n, value );
430 return trySet( mat, i, j, value );
462 return trySet( mat,
row,
column, m, n, value );
490 return tryAdd( mat, i, j, value );
522 return tryAdd( mat,
row,
column, m, n, value );
562 for(
size_t i=ibegin; i<(*rhs).size(); ++i ) {
608 const size_t iend(
min(
row -
column + 1UL, (*rhs).size() ) );
610 for(
size_t i=0UL; i<iend; ++i ) {
657 for(
size_t i=0UL; i<(*rhs).size(); ++i ) {
701 const auto last( (*rhs).end() );
704 for( ; element!=last; ++element ) {
750 const auto last( (*rhs).lowerBound(
row -
column + 1UL ) );
752 for(
auto element=(*rhs).begin(); element!=last; ++element ) {
799 for(
const auto& element : *rhs ) {
828template<
typename MT1
844 const size_t M( (*rhs).rows() );
845 const size_t N( (*rhs).columns() );
852 for(
size_t i=ibegin; i<M; ++i )
856 for(
size_t j=0UL; j<jend; ++j ) {
885template<
typename MT1
901 const size_t M( (*rhs).rows() );
902 const size_t N( (*rhs).columns() );
909 for(
size_t j=0UL; j<jend; ++j )
911 const bool containsDiagonal(
column + j >=
row );
912 const size_t ibegin( ( containsDiagonal )?(
column + j -
row ):( 0UL ) );
914 for(
size_t i=ibegin; i<M; ++i ) {
943template<
typename MT1
959 const size_t M( (*rhs).rows() );
960 const size_t N( (*rhs).columns() );
967 for(
size_t i=ibegin; i<M; ++i )
969 const size_t index(
row + i -
column + 1UL );
970 const auto last( (*rhs).lowerBound( i,
min( index, N ) ) );
972 for(
auto element=(*rhs).begin(i); element!=last; ++element ) {
1001template<
typename MT1
1017 const size_t M( (*rhs).rows() );
1018 const size_t N( (*rhs).columns() );
1025 for(
size_t j=0UL; j<jend; ++j )
1027 const bool containsDiagonal(
column + j >=
row );
1028 const size_t index( ( containsDiagonal )?(
column + j -
row ):( 0UL ) );
1030 const auto last( (*rhs).end(j) );
1031 auto element( (*rhs).lowerBound( index, j ) );
1033 for( ; element!=last; ++element ) {
1062template<
typename MT
1070 return tryAssign( lhs, *rhs,
row,
column );
1094template<
typename MT
1125template<
typename MT1
1133 return tryAssign( lhs, *rhs,
row,
column );
1156template<
typename MT
1164 return tryAssign( lhs, *rhs,
row,
column );
1188template<
typename MT
1219template<
typename MT1
1227 return tryAssign( lhs, *rhs,
row,
column );
1250template<
typename MT
1258 return tryAssign( lhs, *rhs,
row,
column );
1281template<
typename MT
1312template<
typename MT1
1320 return tryAssign( lhs, *rhs,
row,
column );
1343template<
typename MT
1351 return tryAssign( lhs, *rhs,
row,
column );
1374template<
typename MT
1405template<
typename MT1
1413 return tryAssign( lhs, *rhs,
row,
column );
1433template<
typename MT
1454template<
typename MT,
bool SO,
bool DF >
1456 :
public Size<MT,0UL>
1459template<
typename MT,
bool SO,
bool DF >
1461 :
public Size<MT,1UL>
1477template<
typename MT,
bool SO,
bool DF >
1482template<
typename MT,
bool SO,
bool DF >
1500template<
typename MT,
bool SO,
bool DF >
1518template<
typename MT,
bool SO,
bool DF >
1536template<
typename MT,
bool SO,
bool DF >
1554template<
typename MT,
bool SO,
bool DF >
1572template<
typename MT,
bool SO,
bool DF >
1590template<
typename MT,
bool SO,
bool DF >
1608template<
typename MT,
bool SO,
bool DF >
1626template<
typename MT,
bool SO,
bool DF >
1644template<
typename MT,
bool SO >
1662template<
typename MT,
bool SO,
bool DF >
1680template<
typename MT,
bool SO,
bool DF >
1698template<
typename MT,
bool SO,
bool DF >
1716template<
typename MT,
bool SO,
bool DF >
1735template<
typename T1,
typename T2 >
1736struct AddTraitEval1< T1, T2
1758template<
typename T1,
typename T2 >
1759struct SubTraitEval1< T1, T2
1783template<
typename T1,
typename T2 >
1784struct SchurTraitEval1< T1, T2
1807template<
typename T1,
typename T2 >
1808struct MultTraitEval1< T1, T2
1816template<
typename T1,
typename T2 >
1817struct MultTraitEval1< T1, T2
1825template<
typename T1,
typename T2 >
1826struct MultTraitEval1< T1, T2
1850template<
typename T1,
typename T2 >
1851struct KronTraitEval1< T1, T2
1874template<
typename T1,
typename T2 >
1875struct DivTraitEval1< T1, T2
1894template<
typename T,
typename OP >
1895struct UnaryMapTraitEval1< T, OP
1907template<
typename T1,
typename T2,
typename OP >
1908struct BinaryMapTraitEval1< T1, T2, OP
1928template<
typename MT,
bool SO,
bool DF >
1931 using Type = ZeroMatrix< typename MT::ElementType, SO >;
1947template<
typename MT,
bool SO,
bool DF >
1950 using Type = ZeroMatrix< typename MT::ElementType, SO >;
1966template<
typename MT,
bool SO,
bool DF >
1969 using Type = ZeroMatrix< typename MT::ElementType, SO >;
1985template<
typename MT,
bool SO,
bool DF >
1988 using Type = INVALID_TYPE;
2004template<
typename MT,
bool SO,
bool DF >
2007 using Type = ZeroMatrix< typename MT::ElementType, SO >;
2023template<
typename MT,
bool SO,
bool DF >
2026 using Type = StrictlyUpperMatrix<MT,SO,DF>;
2042template<
typename MT,
bool SO,
bool DF >
2045 using Type = INVALID_TYPE;
2061template<
typename MT,
bool SO,
bool DF >
2064 using Type = StrictlyUpperMatrix<MT,SO,DF>;
2080template<
typename MT,
bool SO,
bool DF >
2083 using Type = ZeroMatrix< typename MT::ElementType, SO >;
2099template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
2102 using Type = StrictlyUpperMatrix< typename HighType<MT1,MT2>::Type >;
2118template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
2121 using Type = StrictlyUpperMatrix< typename LowType<MT1,MT2>::Type >;
2137template<
typename MT,
size_t I,
size_t N >
2138struct SubmatrixTraitEval1< MT, I, I, N, N
Header file for the addition trait.
Header file for run time assertion macros.
Header file for the decldiag trait.
Header file for the declherm trait.
Header file for the decllow trait.
Header file for the declstrlow trait.
Header file for the declstrupp trait.
Header file for the declsym trait.
Header file for the declunilow trait.
Header file for the decluniupp trait.
Header file for the declupp trait.
Header file for the division trait.
Header file for the EnableIf class template.
Header file for the HasConstDataAccess type trait.
Header file for the HighType type trait.
Header file for the IntegralConstant class template.
Utility type for generic codes.
Header file for the IsAdaptor type trait.
Header file for the IsAligned type trait.
Header file for the IsContiguous type trait.
Header file for the isDefault shim.
Header file for the IsHermitian type trait.
Header file for the IsIdentity type trait.
Header file for the IsLower type trait.
Header file for the IsMatrix type trait.
Header file for the IsPadded type trait.
Header file for the IsRestricted type trait.
Header file for the IsScalar type trait.
Header file for the IsSquare type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUniUpper type trait.
Header file for the IsUpper type trait.
Header file for the Kron product trait.
Header file for the LowType type trait.
Header file for the map trait.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Header file for the relaxation flag enumeration.
Header file for the RemoveAdaptor type trait.
Header file for the Schur product trait.
Header file for the subtraction trait.
Header file for the submatrix trait.
Header file for the YieldsDiagonal type trait.
Header file for the YieldsStrictlyUpper type trait.
Header file for the implementation of the base template of the StrictlyUpperMatrix.
StrictlyUpperMatrix specialization for dense matrices.
StrictlyUpperMatrix specialization for sparse matrices.
Base class for dense matrices.
Definition DenseMatrix.h:82
Base class for N-dimensional dense vectors.
Definition DenseVector.h:77
Base class for matrices.
Definition Matrix.h:85
Base class for sparse matrices.
Definition SparseMatrix.h:77
Base class for sparse vectors.
Definition SparseVector.h:72
Matrix adapter for strictly upper triangular matrices.
Definition BaseTemplate.h:563
Base class for N-dimensional vectors.
Definition Vector.h:82
Constraint on the data type.
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition Band.h:140
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition Column.h:137
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1339
bool isLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower triangular matrix.
Definition DenseMatrix.h:1921
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition DiagonalMatrix.h:225
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition RequiresEvaluation.h:81
constexpr bool IsStrictlyUpper_v
Auxiliary variable template for the IsStrictlyUpper type trait.
Definition IsStrictlyUpper.h:173
constexpr bool IsScalar_v
Auxiliary variable template for the IsScalar type trait.
Definition IsScalar.h:104
constexpr bool IsUniUpper_v
Auxiliary variable template for the IsUniUpper type trait.
Definition IsUniUpper.h:173
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.
Definition IsUniform.h:164
constexpr bool IsUpper_v
Auxiliary variable template for the IsUpper type trait.
Definition IsUpper.h:175
constexpr bool YieldsDiagonal_v
Auxiliary variable template for the YieldsDiagonal type trait.
Definition YieldsDiagonal.h:126
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition Size.h:176
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition Size.h:72
constexpr bool StorageOrder_v
Auxiliary variable template for the StorageOrder type trait.
Definition StorageOrder.h:93
constexpr bool IsZero_v
Auxiliary variable template for the IsZero type trait.
Definition IsZero.h:166
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.
Definition IsMatrix.h:124
constexpr bool IsIdentity_v
Auxiliary variable template for the IsIdentity type trait.
Definition IsIdentity.h:137
constexpr bool YieldsStrictlyUpper_v
Auxiliary variable template for the YieldsStrictlyUpper type trait.
Definition YieldsStrictlyUpper.h:124
constexpr bool IsLower_v
Auxiliary variable template for the IsLower type trait.
Definition IsLower.h:175
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition RelaxationFlag.h:66
constexpr Infinity inf
Global Infinity instance.
Definition Infinity.h:1080
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition Inline.h:85
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
Header file for all forward declarations of the math module.
Header file for the Size type trait.
Header file for the StorageOrder type trait.
Base template for the DeclDiagTrait class.
Definition DeclDiagTrait.h:127
Base template for the DeclHermTrait class.
Definition DeclHermTrait.h:126
Base template for the DeclLowTrait class.
Definition DeclLowTrait.h:126
Base template for the DeclStrLowTrait class.
Definition DeclStrLowTrait.h:128
Base template for the DeclStrUppTrait class.
Definition DeclStrUppTrait.h:128
Base template for the DeclSymTrait class.
Definition DeclSymTrait.h:126
Base template for the DeclUniLowTrait class.
Definition DeclUniLowTrait.h:128
Base template for the DeclUniUppTrait class.
Definition DeclUniUppTrait.h:128
Base template for the DeclUppTrait class.
Definition DeclUppTrait.h:126
Compile time check for low-level access to constant data.
Definition HasConstDataAccess.h:76
Base template for the HighType type trait.
Definition HighType.h:322
Compile time check for adaptors.
Definition IsAdaptor.h:89
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Compile time check for the memory layout of data types.
Definition IsContiguous.h:87
Compile time check for Hermitian matrices.
Definition IsHermitian.h:115
Compile time check for data types with padding.
Definition IsPadded.h:77
Compile time check for data types with restricted data access.
Definition IsRestricted.h:83
Compile time check for square matrices.
Definition IsSquare.h:89
Compile time check for strictly lower triangular matrices.
Definition IsStrictlyLower.h:116
Compile time check for strictly upper triangular matrices.
Definition IsStrictlyUpper.h:116
Compile time check for symmetric matrices.
Definition IsSymmetric.h:115
Base template for the LowType type trait.
Definition LowType.h:322
Compile time evaluation of the maximum size of vectors and matrices.
Definition MaxSize.h:118
Removal of top level adaptor types.
Definition RemoveAdaptor.h:77
Compile time evaluation of the size of vectors and matrices.
Definition Size.h:119
Header file for the IsZero type trait.
Header file for the generic min algorithm.