35 #ifndef _BLAZE_MATH_SPARSE_IDENTITYMATRIX_H_ 36 #define _BLAZE_MATH_SPARSE_IDENTITYMATRIX_H_ 181 template<
typename Type
182 ,
bool SO = defaultStorageOrder >
184 :
public SparseMatrix< IdentityMatrix<Type,SO>, SO >
203 template<
typename NewType >
212 template<
size_t NewM
290 return Element( Type(1), index_ );
331 return index_ == rhs.
index_;
342 return index_ != rhs.
index_;
353 return index_ - rhs.
index_;
382 template<
typename MT,
bool SO2 >
409 template<
typename MT,
bool SO2 >
420 inline size_t rows()
const noexcept;
421 inline size_t columns()
const noexcept;
422 inline size_t capacity()
const noexcept;
423 inline size_t capacity(
size_t i )
const noexcept;
425 inline size_t nonZeros(
size_t i )
const;
428 inline void swap( IdentityMatrix& m ) noexcept;
452 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
453 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
491 template<
typename Type
504 template<
typename Type
521 template<
typename Type
523 template<
typename MT
553 template<
typename Type
580 template<
typename Type
607 template<
typename Type
630 template<
typename Type
653 template<
typename Type
676 template<
typename Type
706 template<
typename Type
708 template<
typename MT
737 template<
typename Type
751 template<
typename Type
765 template<
typename Type
785 template<
typename Type
803 template<
typename Type
823 template<
typename Type
843 template<
typename Type
862 template<
typename Type
877 template<
typename Type
909 template<
typename Type
920 return end( SO ? j : i );
938 template<
typename Type
946 if( ( !SO && j <= i ) || ( SO && i <= j ) )
947 return begin( SO ? j : i );
949 return end( SO ? j : i );
967 template<
typename Type
975 if( ( !SO && j < i ) || ( SO && i < j ) )
976 return begin( SO ? j : i );
978 return end( SO ? j : i );
996 template<
typename Type
1010 template<
typename Type
1037 template<
typename Type
1039 template<
typename Other >
1059 template<
typename Type
1061 template<
typename Other >
1081 template<
typename Type
1105 template<
typename Type,
bool SO >
1108 template<
typename Type,
bool SO >
1111 template<
typename Type,
bool SO >
1114 template<
bool RF,
typename Type,
bool SO >
1117 template<
typename Type,
bool SO >
1120 template<
typename Type,
bool SO >
1133 template<
typename Type
1155 template<
typename Type
1171 template<
typename Type
1210 return ( m.rows() == 0UL );
1233 template<
typename Type
1252 template<
typename Type
1297 template<
typename T
1301 inline decltype(
auto)
1344 template<
typename VT
1348 inline decltype(
auto)
1353 if( (~vec).
size() != (~mat).
rows() ) {
1391 template<
typename T
1395 inline decltype(
auto)
1438 template<
typename VT
1442 inline decltype(
auto)
1447 if( (~vec).
size() != (~mat).
rows() ) {
1482 template<
typename T
1487 inline decltype(
auto)
1527 template<
typename MT
1532 inline decltype(
auto)
1572 template<
typename T
1577 inline decltype(
auto)
1617 template<
typename MT
1622 inline decltype(
auto)
1660 template<
typename T1
1664 inline decltype(
auto)
1706 template<
typename MT
1717 return IdentityMatrix<ElementType_<MT>,SO>( (~m).
rows() );
1732 template<
typename MT,
bool SO >
1733 struct IsSquare< IdentityMatrix<MT,SO> >
1750 template<
typename MT,
bool SO >
1768 template<
typename MT,
bool SO >
1786 template<
typename MT,
bool SO >
1804 template<
typename MT,
bool SO >
1822 template<
typename T,
bool SO >
1840 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
1841 struct AddTrait< IdentityMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
1846 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
1847 struct AddTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
1852 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
1853 struct AddTrait< StaticMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
1858 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
1859 struct AddTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
1864 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
1865 struct AddTrait< IdentityMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
1870 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
1871 struct AddTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
1876 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
1877 struct AddTrait< HybridMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
1882 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
1883 struct AddTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
1888 template<
typename T1,
bool SO,
typename T2 >
1889 struct AddTrait< IdentityMatrix<T1,SO>, DynamicMatrix<T2,SO> >
1894 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1895 struct AddTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
1900 template<
typename T1,
bool SO,
typename T2 >
1901 struct AddTrait< DynamicMatrix<T1,SO>, IdentityMatrix<T2,SO> >
1906 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1907 struct AddTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
1912 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
1913 struct AddTrait< IdentityMatrix<T1,SO>, CustomMatrix<T2,AF,PF,SO> >
1918 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
1919 struct AddTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
1924 template<
typename T1,
bool AF,
bool PF,
bool SO,
typename T2 >
1925 struct AddTrait< CustomMatrix<T1,AF,PF,SO>, IdentityMatrix<T2,SO> >
1930 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
1931 struct AddTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
1936 template<
typename T1,
bool SO,
typename T2 >
1937 struct AddTrait< IdentityMatrix<T1,SO>, CompressedMatrix<T2,SO> >
1942 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1943 struct AddTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
1948 template<
typename T1,
bool SO,
typename T2 >
1949 struct AddTrait< CompressedMatrix<T1,SO>, IdentityMatrix<T2,SO> >
1954 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1955 struct AddTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
1960 template<
typename T1,
bool SO,
typename T2 >
1961 struct AddTrait< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
1966 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1967 struct AddTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
1985 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
1986 struct SubTrait< IdentityMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
1991 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
1992 struct SubTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
1997 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
1998 struct SubTrait< StaticMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
2003 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2004 struct SubTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2009 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
2010 struct SubTrait< IdentityMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
2015 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2016 struct SubTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
2021 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
2022 struct SubTrait< HybridMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
2027 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2028 struct SubTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2033 template<
typename T1,
bool SO,
typename T2 >
2034 struct SubTrait< IdentityMatrix<T1,SO>, DynamicMatrix<T2,SO> >
2039 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2040 struct SubTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
2045 template<
typename T1,
bool SO,
typename T2 >
2046 struct SubTrait< DynamicMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2051 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2052 struct SubTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2057 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
2058 struct SubTrait< IdentityMatrix<T1,SO>, CustomMatrix<T2,AF,PF,SO> >
2063 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
2064 struct SubTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
2069 template<
typename T1,
bool AF,
bool PF,
bool SO,
typename T2 >
2070 struct SubTrait< CustomMatrix<T1,AF,PF,SO>, IdentityMatrix<T2,SO> >
2075 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
2076 struct SubTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
2081 template<
typename T1,
bool SO,
typename T2 >
2082 struct SubTrait< IdentityMatrix<T1,SO>, CompressedMatrix<T2,SO> >
2087 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2088 struct SubTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
2093 template<
typename T1,
bool SO,
typename T2 >
2094 struct SubTrait< CompressedMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2099 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2100 struct SubTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2105 template<
typename T1,
bool SO,
typename T2 >
2106 struct SubTrait< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2111 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2112 struct SubTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2130 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2131 struct SchurTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
2136 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2137 struct SchurTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2142 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2143 struct SchurTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
2148 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2149 struct SchurTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2154 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2155 struct SchurTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
2160 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2161 struct SchurTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2166 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
2167 struct SchurTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
2172 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
2173 struct SchurTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
2178 template<
typename T1,
bool SO,
typename T2 >
2179 struct SchurTrait< IdentityMatrix<T1,SO>, CompressedMatrix<T2,SO> >
2184 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2185 struct SchurTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
2190 template<
typename T1,
bool SO,
typename T2 >
2191 struct SchurTrait< CompressedMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2196 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2197 struct SchurTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2202 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2203 struct SchurTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2221 template<
typename T1,
bool SO,
typename T2 >
2222 struct MultTrait< IdentityMatrix<T1,SO>, T2, EnableIf_< IsNumeric<T2> > >
2227 template<
typename T1,
typename T2,
bool SO >
2228 struct MultTrait< T1, IdentityMatrix<T2,SO>, EnableIf_< IsNumeric<T1> > >
2233 template<
typename T1,
bool SO,
typename T2,
size_t N >
2234 struct MultTrait< IdentityMatrix<T1,SO>, StaticVector<T2,N,false> >
2239 template<
typename T1,
size_t N,
typename T2,
bool SO >
2240 struct MultTrait< StaticVector<T1,N,true>, IdentityMatrix<T2,SO> >
2245 template<
typename T1,
bool SO,
typename T2,
size_t N >
2246 struct MultTrait< IdentityMatrix<T1,SO>, HybridVector<T2,N,false> >
2251 template<
typename T1,
size_t N,
typename T2,
bool SO >
2252 struct MultTrait< HybridVector<T1,N,true>, IdentityMatrix<T2,SO> >
2257 template<
typename T1,
bool SO,
typename T2 >
2258 struct MultTrait< IdentityMatrix<T1,SO>, DynamicVector<T2,false> >
2263 template<
typename T1,
typename T2,
bool SO >
2264 struct MultTrait< DynamicVector<T1,true>, IdentityMatrix<T2,SO> >
2269 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
2270 struct MultTrait< IdentityMatrix<T1,SO>, CustomVector<T2,AF,PF,false> >
2275 template<
typename T1,
bool AF,
bool PF,
typename T2,
bool SO >
2276 struct MultTrait< CustomVector<T1,AF,PF,true>, IdentityMatrix<T2,SO> >
2281 template<
typename T1,
bool SO,
typename T2 >
2282 struct MultTrait< IdentityMatrix<T1,SO>, CompressedVector<T2,false> >
2287 template<
typename T1,
typename T2,
bool SO >
2288 struct MultTrait< CompressedVector<T1,true>, IdentityMatrix<T2,SO> >
2293 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2294 struct MultTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
2299 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2300 struct MultTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2305 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2306 struct MultTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
2311 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2312 struct MultTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2317 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2318 struct MultTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
2323 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2324 struct MultTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2329 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
2330 struct MultTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
2335 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
2336 struct MultTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
2341 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2342 struct MultTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
2347 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2348 struct MultTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2353 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2354 struct MultTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2372 template<
typename T1,
bool SO,
typename T2 >
2373 struct DivTrait< IdentityMatrix<T1,SO>, T2, EnableIf_< IsNumeric<T2> > >
2391 template<
typename T,
bool SO,
typename OP >
2397 template<
typename T,
bool SO >
2403 template<
typename T,
bool SO >
2409 template<
typename T,
bool SO >
2415 template<
typename T,
bool SO >
2421 template<
typename T,
bool SO >
2427 template<
typename T,
bool SO >
2433 template<
typename T,
bool SO >
2439 template<
typename T,
bool SO >
2445 template<
typename T,
bool SO >
2451 template<
typename T,
bool SO,
typename ET >
2470 template<
typename T,
bool SO >
2489 template<
typename T,
bool SO >
2508 template<
typename T,
bool SO >
2527 template<
typename T,
bool SO >
2546 template<
typename T,
bool SO >
2565 template<
typename T1,
bool SO,
typename T2 >
2566 struct HighType< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2584 template<
typename T1,
bool SO,
typename T2 >
2585 struct LowType< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2603 template<
typename T,
bool SO,
size_t I,
size_t J,
size_t M,
size_t N >
2609 template<
typename T,
bool SO >
2628 template<
typename T,
bool SO,
size_t... CRAs >
2629 struct RowTrait< IdentityMatrix<T,SO>, CRAs... >
2647 template<
typename T,
bool SO,
size_t... CRAs >
2648 struct RowsTrait< IdentityMatrix<T,SO>, CRAs... >
2666 template<
typename T,
bool SO,
size_t... CCAs >
2667 struct ColumnTrait< IdentityMatrix<T,SO>, CCAs... >
2685 template<
typename T,
bool SO,
size_t... CCAs >
2704 template<
typename T,
bool SO,
ptrdiff_t... CBAs >
2705 struct BandTrait< IdentityMatrix<T,SO>, CBAs... >
2710 template<
typename T,
bool SO >
2711 struct BandTrait< IdentityMatrix<T,SO>, 0L >
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:79
#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.
Header file for the decldiag trait.
Iterator over the elements of the identity matrix.
Definition: IdentityMatrix.h:222
Constraint on the data type.
Header file for the Schur product trait.
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: IdentityMatrix.h:1062
#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 UNUSED_PARAMETER function template.
ConstIterator & operator++()
Pre-increment operator.
Definition: IdentityMatrix.h:266
Header file for the IsUniUpper type trait.
Header file for the subtraction trait.
const Type ReturnType
Return type for expression template evaluations.
Definition: IdentityMatrix.h:194
Header file for basic type definitions.
Header file for the SparseVector base class.
IdentityMatrix() noexcept
The default constructor for IdentityMatrix.
Definition: IdentityMatrix.h:493
Header file for the row trait.
Header file for the declherm trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:109
Resize mechanism to obtain a IdentityMatrix with different fixed dimensions.
Definition: IdentityMatrix.h:214
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:108
IdentityMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: IdentityMatrix.h:1012
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:221
const Type ConstReference
Reference to a constant identity matrix element.
Definition: IdentityMatrix.h:197
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
Base template for the DeclUppTrait class.
Definition: DeclUppTrait.h:113
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Base template for the SchurTrait class.
Definition: SchurTrait.h:112
size_t index() const
Access to the current index of the sparse element.
Definition: IdentityMatrix.h:319
size_t columns() const noexcept
Returns the current number of columns of the identity matrix.
Definition: IdentityMatrix.h:753
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
Header file for the DenseVector base class.
Header file for the IsIdentity type trait.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: IdentityMatrix.h:341
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
void resize(size_t n)
Changing the size of the identity matrix.
Definition: IdentityMatrix.h:864
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: IdentityMatrix.h:229
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: IdentityMatrix.h:941
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:185
Efficient implementation of a dynamic matrix.The DynamicMatrix class template is the representation ...
Definition: DynamicMatrix.h:217
Header file for the IsUniLower type trait.
size_t capacity() const noexcept
Returns the maximum capacity of the identity matrix.
Definition: IdentityMatrix.h:767
Base template for the RowsTrait class.
Definition: RowsTrait.h:109
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
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.
void swap(IdentityMatrix &m) noexcept
Swapping the contents of two sparse matrices.
Definition: IdentityMatrix.h:879
size_t nonZeros() const
Returns the number of non-zero elements in the identity matrix.
Definition: IdentityMatrix.h:805
Constraint on the data type.
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1827
Efficient implementation of a fixed-sized vector.The StaticVector class template is the representatio...
Definition: Forward.h:61
ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first non-zero element of row/column i.
Definition: IdentityMatrix.h:633
Header file for the SparseMatrix base class.
Efficient implementation of a dynamically sized vector with static memory.The HybridVector class temp...
Definition: Forward.h:59
Header file for the IsSquare type trait.
Base template for the RowTrait class.
Definition: RowTrait.h:109
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Header file for the ValueIndexPair class.
Efficient implementation of an identity matrix.The IdentityMatrix class template is the representati...
Definition: Forward.h:49
Header file for the LowType type trait.
Base template for the HighType type trait.
Definition: HighType.h:133
Header file for the multiplication trait.
Header file for the unary map trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5908
Header file for the If class template.
Header file for all forward declarations of the math module.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
Header file for the IsSMPAssignable type trait.
Header file for the decllow trait.
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Efficient implementation of a fixed-sized matrix.The StaticMatrix class template is the representatio...
Definition: Forward.h:60
Header file for the DenseMatrix base class.
Type ElementType
Type of the identity matrix elements.
Definition: IdentityMatrix.h:193
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3085
ConstIterator end(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: IdentityMatrix.h:656
Constraint on the data type.
IdentityMatrix & transpose()
In-place transpose of the matrix.
Definition: IdentityMatrix.h:998
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: IdentityMatrix.h:912
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:88
Header file for the default storage order for all vectors of the Blaze library.
Header file for the IsUniTriangular type trait.
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: IdentityMatrix.h:299
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:113
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
Header file for the exception macros of the math module.
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsSMPAssignable.h:123
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two ConstIterator objects.
Definition: IdentityMatrix.h:352
Rebind mechanism to obtain an IdentityMatrix with different data/element type.
Definition: IdentityMatrix.h:204
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:8893
size_t index_
Index to the current identity matrix element.
Definition: IdentityMatrix.h:359
ConstIterator operator++(int)
Post-increment operator.
Definition: IdentityMatrix.h:277
Header file for the EnableIf class template.
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: IdentityMatrix.h:1083
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
const Type Reference
Reference to a identity matrix element.
Definition: IdentityMatrix.h:196
Header file for the IsNumeric type trait.
Base template for the LowType type trait.
Definition: LowType.h:133
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
size_t n_
The current number of rows and columns of the identity matrix.
Definition: IdentityMatrix.h:463
IdentityMatrix< Type, SO > This
Type of this IdentityMatrix instance.
Definition: IdentityMatrix.h:188
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: IdentityMatrix.h:330
Header file for the declupp trait.
IdentityMatrix< ElementType_< MT >, SO > declid(const Matrix< MT, SO > &m)
Declares the given matrix expression m as identity matrix.
Definition: IdentityMatrix.h:1709
Compile time check for identity matrices.This type trait tests whether or not the given template para...
Definition: IsIdentity.h:89
ConstIterator(size_t index)
Constructor for the ConstIterator class.
Definition: IdentityMatrix.h:256
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:119
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:113
Base template for the MultTrait class.
Definition: MultTrait.h:119
Header file for the addition trait.
ConstReference operator()(size_t i, size_t j) const noexcept
2D-access to the identity matrix elements.
Definition: IdentityMatrix.h:556
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
Header file for the columns trait.
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:61
Header file for the declsym trait.
#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
Efficient implementation of a dynamically sized matrix with static memory.The HybridMatrix class temp...
Definition: Forward.h:58
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
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
Constraint on the data type.
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: IdentityMatrix.h:1040
size_t rows() const noexcept
Returns the current number of rows of the identity matrix.
Definition: IdentityMatrix.h:739
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
Base template for the DivTrait class.
Definition: DivTrait.h:120
Header file for the rows trait.
IdentityMatrix< NewType, SO > Other
The type of the other IdentityMatrix.
Definition: IdentityMatrix.h:205
ConstIterator begin(size_t i) const noexcept
Returns an iterator to the first non-zero element of row/column i.
Definition: IdentityMatrix.h:610
ConstReference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: IdentityMatrix.h:583
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:113
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
Base template for the ColumnsTrait class.
Definition: ColumnsTrait.h:109
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: IdentityMatrix.h:289
Header file for the default transpose flag for all vectors of the Blaze library.
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
IteratorCategory iterator_category
The iterator category.
Definition: IdentityMatrix.h:236
void clear()
Clearing the identity matrix.
Definition: IdentityMatrix.h:845
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
Type value() const
Access to the current value of the sparse element.
Definition: IdentityMatrix.h:309
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
Base template for the SubTrait class.
Definition: SubTrait.h:119
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
ConstIterator()
Default constructor for the ConstIterator class.
Definition: IdentityMatrix.h:246
Header file for the IsHermitian type trait.
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:113
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:908
Header file for the IsResizable type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:95
ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: IdentityMatrix.h:679
Efficient implementation of an arbitrary sized sparse vector.The CompressedVector class is the repres...
Definition: CompressedVector.h:199
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.
Base template for the BandTrait class.
Definition: BandTrait.h:109
Header file for the function trace functionality.
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: IdentityMatrix.h:970