35 #ifndef _BLAZE_MATH_SPARSE_IDENTITYMATRIX_H_ 36 #define _BLAZE_MATH_SPARSE_IDENTITYMATRIX_H_ 178 template<
typename Type
179 ,
bool SO = defaultStorageOrder >
181 :
public SparseMatrix< IdentityMatrix<Type,SO>, SO >
200 template<
typename NewType >
209 template<
size_t NewM
287 return Element( Type(1), index_ );
328 return index_ == rhs.
index_;
339 return index_ != rhs.
index_;
350 return index_ - rhs.
index_;
379 template<
typename MT,
bool SO2 >
406 template<
typename MT,
bool SO2 >
417 inline size_t rows()
const noexcept;
418 inline size_t columns()
const noexcept;
419 inline size_t capacity()
const noexcept;
420 inline size_t capacity(
size_t i )
const noexcept;
422 inline size_t nonZeros(
size_t i )
const;
425 inline void swap( IdentityMatrix& m ) noexcept;
449 template<
typename Other >
inline bool canAlias (
const Other* alias )
const noexcept;
450 template<
typename Other >
inline bool isAliased(
const Other* alias )
const noexcept;
488 template<
typename Type
501 template<
typename Type
518 template<
typename Type
520 template<
typename MT
550 template<
typename Type
577 template<
typename Type
604 template<
typename Type
627 template<
typename Type
650 template<
typename Type
673 template<
typename Type
703 template<
typename Type
705 template<
typename MT
734 template<
typename Type
748 template<
typename Type
762 template<
typename Type
782 template<
typename Type
800 template<
typename Type
820 template<
typename Type
840 template<
typename Type
859 template<
typename Type
874 template<
typename Type
904 template<
typename Type
915 return end( SO ? j : i );
933 template<
typename Type
941 if( ( !SO && j <= i ) || ( SO && i <= j ) )
942 return begin( SO ? j : i );
944 return end( SO ? j : i );
962 template<
typename Type
970 if( ( !SO && j < i ) || ( SO && i < j ) )
971 return begin( SO ? j : i );
973 return end( SO ? j : i );
991 template<
typename Type
1005 template<
typename Type
1032 template<
typename Type
1034 template<
typename Other >
1054 template<
typename Type
1056 template<
typename Other >
1076 template<
typename Type
1100 template<
typename Type,
bool SO >
1103 template<
typename Type,
bool SO >
1106 template<
typename Type,
bool SO >
1109 template<
bool RF,
typename Type,
bool SO >
1112 template<
typename Type,
bool SO >
1115 template<
typename Type,
bool SO >
1128 template<
typename Type
1150 template<
typename Type
1166 template<
typename Type
1205 return ( m.rows() == 0UL );
1228 template<
typename Type
1247 template<
typename Type
1292 template<
typename T
1296 inline decltype(
auto)
1339 template<
typename VT
1343 inline decltype(
auto)
1348 if( (~vec).
size() != (~mat).
rows() ) {
1386 template<
typename T
1390 inline decltype(
auto)
1433 template<
typename VT
1437 inline decltype(
auto)
1442 if( (~vec).
size() != (~mat).
rows() ) {
1477 template<
typename T
1482 inline decltype(
auto)
1522 template<
typename MT
1527 inline decltype(
auto)
1567 template<
typename T
1572 inline decltype(
auto)
1612 template<
typename MT
1617 inline decltype(
auto)
1655 template<
typename T1
1659 inline decltype(
auto)
1701 template<
typename MT
1712 return IdentityMatrix<ElementType_<MT>,SO>( (~m).
rows() );
1727 template<
typename MT,
bool SO >
1728 struct IsSquare< IdentityMatrix<MT,SO> >
1745 template<
typename MT,
bool SO >
1763 template<
typename MT,
bool SO >
1781 template<
typename MT,
bool SO >
1799 template<
typename MT,
bool SO >
1817 template<
typename T,
bool SO >
1835 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
1836 struct AddTrait< IdentityMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
1841 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
1842 struct AddTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
1847 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
1848 struct AddTrait< StaticMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
1853 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
1854 struct AddTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
1859 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
1860 struct AddTrait< IdentityMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
1865 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
1866 struct AddTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
1871 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
1872 struct AddTrait< HybridMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
1877 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
1878 struct AddTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
1883 template<
typename T1,
bool SO,
typename T2 >
1884 struct AddTrait< IdentityMatrix<T1,SO>, DynamicMatrix<T2,SO> >
1889 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1890 struct AddTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
1895 template<
typename T1,
bool SO,
typename T2 >
1896 struct AddTrait< DynamicMatrix<T1,SO>, IdentityMatrix<T2,SO> >
1901 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1902 struct AddTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
1907 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
1908 struct AddTrait< IdentityMatrix<T1,SO>, CustomMatrix<T2,AF,PF,SO> >
1913 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
1914 struct AddTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
1919 template<
typename T1,
bool AF,
bool PF,
bool SO,
typename T2 >
1920 struct AddTrait< CustomMatrix<T1,AF,PF,SO>, IdentityMatrix<T2,SO> >
1925 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
1926 struct AddTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
1931 template<
typename T1,
bool SO,
typename T2 >
1932 struct AddTrait< IdentityMatrix<T1,SO>, CompressedMatrix<T2,SO> >
1937 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1938 struct AddTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
1943 template<
typename T1,
bool SO,
typename T2 >
1944 struct AddTrait< CompressedMatrix<T1,SO>, IdentityMatrix<T2,SO> >
1949 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1950 struct AddTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
1955 template<
typename T1,
bool SO,
typename T2 >
1956 struct AddTrait< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
1961 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
1962 struct AddTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
1980 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
1981 struct SubTrait< IdentityMatrix<T1,SO>, StaticMatrix<T2,M,N,SO> >
1986 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
1987 struct SubTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
1992 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
1993 struct SubTrait< StaticMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
1998 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
1999 struct SubTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2004 template<
typename T1,
bool SO,
typename T2,
size_t M,
size_t N >
2005 struct SubTrait< IdentityMatrix<T1,SO>, HybridMatrix<T2,M,N,SO> >
2010 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2011 struct SubTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
2016 template<
typename T1,
size_t M,
size_t N,
bool SO,
typename T2 >
2017 struct SubTrait< HybridMatrix<T1,M,N,SO>, IdentityMatrix<T2,SO> >
2022 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2023 struct SubTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2028 template<
typename T1,
bool SO,
typename T2 >
2029 struct SubTrait< IdentityMatrix<T1,SO>, DynamicMatrix<T2,SO> >
2034 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2035 struct SubTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
2040 template<
typename T1,
bool SO,
typename T2 >
2041 struct SubTrait< DynamicMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2046 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2047 struct SubTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2052 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
2053 struct SubTrait< IdentityMatrix<T1,SO>, CustomMatrix<T2,AF,PF,SO> >
2058 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
2059 struct SubTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
2064 template<
typename T1,
bool AF,
bool PF,
bool SO,
typename T2 >
2065 struct SubTrait< CustomMatrix<T1,AF,PF,SO>, IdentityMatrix<T2,SO> >
2070 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
2071 struct SubTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
2076 template<
typename T1,
bool SO,
typename T2 >
2077 struct SubTrait< IdentityMatrix<T1,SO>, CompressedMatrix<T2,SO> >
2082 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2083 struct SubTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
2088 template<
typename T1,
bool SO,
typename T2 >
2089 struct SubTrait< CompressedMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2094 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2095 struct SubTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2100 template<
typename T1,
bool SO,
typename T2 >
2101 struct SubTrait< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2106 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2107 struct SubTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2125 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2126 struct SchurTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
2131 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2132 struct SchurTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2137 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2138 struct SchurTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
2143 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2144 struct SchurTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2149 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2150 struct SchurTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
2155 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2156 struct SchurTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2161 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
2162 struct SchurTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
2167 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
2168 struct SchurTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
2173 template<
typename T1,
bool SO,
typename T2 >
2174 struct SchurTrait< IdentityMatrix<T1,SO>, CompressedMatrix<T2,SO> >
2179 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2180 struct SchurTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
2185 template<
typename T1,
bool SO,
typename T2 >
2186 struct SchurTrait< CompressedMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2191 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2192 struct SchurTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2197 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2198 struct SchurTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2216 template<
typename T1,
bool SO,
typename T2 >
2217 struct MultTrait< IdentityMatrix<T1,SO>, T2, EnableIf_< IsNumeric<T2> > >
2222 template<
typename T1,
typename T2,
bool SO >
2223 struct MultTrait< T1, IdentityMatrix<T2,SO>, EnableIf_< IsNumeric<T1> > >
2228 template<
typename T1,
bool SO,
typename T2,
size_t N >
2229 struct MultTrait< IdentityMatrix<T1,SO>, StaticVector<T2,N,false> >
2234 template<
typename T1,
size_t N,
typename T2,
bool SO >
2235 struct MultTrait< StaticVector<T1,N,true>, IdentityMatrix<T2,SO> >
2240 template<
typename T1,
bool SO,
typename T2,
size_t N >
2241 struct MultTrait< IdentityMatrix<T1,SO>, HybridVector<T2,N,false> >
2246 template<
typename T1,
size_t N,
typename T2,
bool SO >
2247 struct MultTrait< HybridVector<T1,N,true>, IdentityMatrix<T2,SO> >
2252 template<
typename T1,
bool SO,
typename T2 >
2253 struct MultTrait< IdentityMatrix<T1,SO>, DynamicVector<T2,false> >
2258 template<
typename T1,
typename T2,
bool SO >
2259 struct MultTrait< DynamicVector<T1,true>, IdentityMatrix<T2,SO> >
2264 template<
typename T1,
bool SO,
typename T2,
bool AF,
bool PF >
2265 struct MultTrait< IdentityMatrix<T1,SO>, CustomVector<T2,AF,PF,false> >
2270 template<
typename T1,
bool AF,
bool PF,
typename T2,
bool SO >
2271 struct MultTrait< CustomVector<T1,AF,PF,true>, IdentityMatrix<T2,SO> >
2276 template<
typename T1,
bool SO,
typename T2 >
2277 struct MultTrait< IdentityMatrix<T1,SO>, CompressedVector<T2,false> >
2282 template<
typename T1,
typename T2,
bool SO >
2283 struct MultTrait< CompressedVector<T1,true>, IdentityMatrix<T2,SO> >
2288 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2289 struct MultTrait< IdentityMatrix<T1,SO1>, StaticMatrix<T2,M,N,SO2> >
2294 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2295 struct MultTrait< StaticMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2300 template<
typename T1,
bool SO1,
typename T2,
size_t M,
size_t N,
bool SO2 >
2301 struct MultTrait< IdentityMatrix<T1,SO1>, HybridMatrix<T2,M,N,SO2> >
2306 template<
typename T1,
size_t M,
size_t N,
bool SO1,
typename T2,
bool SO2 >
2307 struct MultTrait< HybridMatrix<T1,M,N,SO1>, IdentityMatrix<T2,SO2> >
2312 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2313 struct MultTrait< IdentityMatrix<T1,SO1>, DynamicMatrix<T2,SO2> >
2318 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2319 struct MultTrait< DynamicMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2324 template<
typename T1,
bool SO1,
typename T2,
bool AF,
bool PF,
bool SO2 >
2325 struct MultTrait< IdentityMatrix<T1,SO1>, CustomMatrix<T2,AF,PF,SO2> >
2330 template<
typename T1,
bool AF,
bool PF,
bool SO1,
typename T2,
bool SO2 >
2331 struct MultTrait< CustomMatrix<T1,AF,PF,SO1>, IdentityMatrix<T2,SO2> >
2336 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2337 struct MultTrait< IdentityMatrix<T1,SO1>, CompressedMatrix<T2,SO2> >
2342 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2343 struct MultTrait< CompressedMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2348 template<
typename T1,
bool SO1,
typename T2,
bool SO2 >
2349 struct MultTrait< IdentityMatrix<T1,SO1>, IdentityMatrix<T2,SO2> >
2367 template<
typename T1,
bool SO,
typename T2 >
2368 struct DivTrait< IdentityMatrix<T1,SO>, T2, EnableIf_< IsNumeric<T2> > >
2386 template<
typename T,
bool SO,
typename OP >
2392 template<
typename T,
bool SO >
2398 template<
typename T,
bool SO >
2404 template<
typename T,
bool SO >
2410 template<
typename T,
bool SO >
2416 template<
typename T,
bool SO >
2422 template<
typename T,
bool SO >
2428 template<
typename T,
bool SO >
2434 template<
typename T,
bool SO >
2440 template<
typename T,
bool SO >
2446 template<
typename T,
bool SO,
typename ET >
2465 template<
typename T,
bool SO >
2484 template<
typename T,
bool SO >
2503 template<
typename T,
bool SO >
2522 template<
typename T,
bool SO >
2541 template<
typename T,
bool SO >
2560 template<
typename T1,
bool SO,
typename T2 >
2561 struct HighType< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2579 template<
typename T1,
bool SO,
typename T2 >
2580 struct LowType< IdentityMatrix<T1,SO>, IdentityMatrix<T2,SO> >
2598 template<
typename T1,
bool SO >
2617 template<
typename T1,
bool SO >
2618 struct RowTrait< IdentityMatrix<T1,SO> >
2636 template<
typename T1,
bool SO >
#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:219
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:1057
#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:263
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:191
Header file for basic type definitions.
Header file for the SparseVector base class.
IdentityMatrix() noexcept
The default constructor for IdentityMatrix.
Definition: IdentityMatrix.h:490
Header file for the row trait.
Header file for the declherm trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:128
Resize mechanism to obtain a IdentityMatrix with different fixed dimensions.
Definition: IdentityMatrix.h:211
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:127
IdentityMatrix & ctranspose()
In-place conjugate transpose of the matrix.
Definition: IdentityMatrix.h:1007
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:216
const Type ConstReference
Reference to a constant identity matrix element.
Definition: IdentityMatrix.h:194
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:133
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:124
size_t index() const
Access to the current index of the sparse element.
Definition: IdentityMatrix.h:316
size_t columns() const noexcept
Returns the current number of columns of the identity matrix.
Definition: IdentityMatrix.h:750
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
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:338
#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:861
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: IdentityMatrix.h:226
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:936
Efficient implementation of an arbitrary sized vector.The DynamicVector class template is the represe...
Definition: DynamicVector.h:183
Efficient implementation of a dynamic matrix.The DynamicMatrix class template is the representation ...
Definition: DynamicMatrix.h:212
Header file for the IsUniLower type trait.
size_t capacity() const noexcept
Returns the maximum capacity of the identity matrix.
Definition: IdentityMatrix.h:764
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:78
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
void swap(IdentityMatrix &m) noexcept
Swapping the contents of two sparse matrices.
Definition: IdentityMatrix.h:876
size_t nonZeros() const
Returns the number of non-zero elements in the identity matrix.
Definition: IdentityMatrix.h:802
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:1686
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:630
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:127
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:57
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5924
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:190
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
ConstIterator end(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: IdentityMatrix.h:653
Constraint on the data type.
IdentityMatrix & transpose()
In-place transpose of the matrix.
Definition: IdentityMatrix.h:993
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: IdentityMatrix.h:907
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:296
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:134
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:119
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two ConstIterator objects.
Definition: IdentityMatrix.h:349
Rebind mechanism to obtain an IdentityMatrix with different data/element type.
Definition: IdentityMatrix.h:201
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:356
ConstIterator operator++(int)
Post-increment operator.
Definition: IdentityMatrix.h:274
Header file for the EnableIf class template.
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: IdentityMatrix.h:1078
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:193
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:460
IdentityMatrix< Type, SO > This
Type of this IdentityMatrix instance.
Definition: IdentityMatrix.h:185
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: IdentityMatrix.h:327
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:1704
Compile time check for identity matrices.This type trait tests whether or not the given template para...
Definition: IsIdentity.h:90
ConstIterator(size_t index)
Constructor for the ConstIterator class.
Definition: IdentityMatrix.h:253
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:139
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:134
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:139
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:553
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
#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:1035
size_t rows() const noexcept
Returns the current number of rows of the identity matrix.
Definition: IdentityMatrix.h:736
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:139
IdentityMatrix< NewType, SO > Other
The type of the other IdentityMatrix.
Definition: IdentityMatrix.h:202
ConstIterator begin(size_t i) const noexcept
Returns an iterator to the first non-zero element of row/column i.
Definition: IdentityMatrix.h:607
ConstReference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: IdentityMatrix.h:580
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:133
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: IdentityMatrix.h:286
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:233
void clear()
Clearing the identity matrix.
Definition: IdentityMatrix.h:842
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:252
Type value() const
Access to the current value of the sparse element.
Definition: IdentityMatrix.h:306
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
Base template for the SubTrait class.
Definition: SubTrait.h:139
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
ConstIterator()
Default constructor for the ConstIterator class.
Definition: IdentityMatrix.h:243
Header file for the IsHermitian type trait.
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:133
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:742
Header file for the IsResizable type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:117
ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: IdentityMatrix.h:676
Efficient implementation of an arbitrary sized sparse vector.The CompressedVector class is the repres...
Definition: CompressedVector.h:197
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.
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:965