35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATMAPEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_SMATMAPEXPR_H_ 100 template<
typename MT
104 :
public MatMapExpr< SparseMatrix< SMatMapExpr<MT,OP,SO>, SO > >
105 ,
private Computation
125 template<
typename MT2 >
128 enum :
bool { value = useAssign };
141 template<
typename MT2 >
142 struct UseSMPAssign {
143 enum :
bool { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
157 using ReturnType = decltype( std::declval<OP>()( std::declval<RN>() ) );
225 return Element(
op_( it_->value() ), it_->index() );
245 return op_( it_->value() );
266 return it_ == rhs.
it_;
277 return it_ != rhs.
it_;
288 return it_ - rhs.
it_;
302 enum :
bool { smpAssignable = MT::smpAssignable };
340 if( i >=
sm_.rows() ) {
343 if( j >=
sm_.columns() ) {
377 inline size_t rows() const noexcept {
388 return sm_.columns();
398 return sm_.nonZeros();
409 return sm_.nonZeros(i);
478 template<
typename T >
479 inline bool canAlias(
const T* alias )
const noexcept {
480 return sm_.canAlias( alias );
490 template<
typename T >
491 inline bool isAliased(
const T* alias )
const noexcept {
492 return sm_.isAliased( alias );
502 return sm_.canSMPAssign();
526 template<
typename MT2
541 assign( ~lhs,
map( tmp, rhs.op_ ) );
561 template<
typename MT2 >
573 assign( ~lhs, rhs.sm_ );
575 const size_t m( rhs.rows() );
577 for(
size_t i=0UL; i<m; ++i ) {
578 const Iterator
end( (~lhs).
end(i) );
579 for( Iterator element=(~lhs).
begin(i); element!=
end; ++element ) {
580 element->value() = rhs.op_( element->value() );
602 template<
typename MT2 >
614 assign( ~lhs, rhs.sm_ );
616 const size_t n( rhs.columns() );
618 for(
size_t j=0UL; j<n; ++j ) {
619 const Iterator
end( (~lhs).
end(j) );
620 for( Iterator element=(~lhs).
begin(j); element!=
end; ++element ) {
621 element->value() = rhs.op_( element->value() );
643 template<
typename MT2
659 (~lhs).reserve( tmp.nonZeros() );
660 assign( ~lhs,
map( tmp, rhs.op_ ) );
679 template<
typename MT2
694 addAssign( ~lhs,
map( tmp, rhs.op_ ) );
717 template<
typename MT2
732 subAssign( ~lhs,
map( tmp, rhs.op_ ) );
755 template<
typename MT2
770 schurAssign( ~lhs,
map( tmp, rhs.op_ ) );
801 template<
typename MT2
815 const RT tmp( rhs.sm_ );
839 template<
typename MT2
853 const RT tmp( rhs.sm_ );
877 template<
typename MT2
891 const RT tmp( rhs.sm_ );
915 template<
typename MT2
929 const RT tmp( rhs.sm_ );
983 template<
typename MT
1014 template<
typename MT
1044 template<
typename MT
1073 template<
typename MT
1102 template<
typename MT
1131 template<
typename MT
1160 template<
typename MT
1189 template<
typename MT
1227 template<
typename MT
1255 template<
typename MT
1284 template<
typename MT
1316 template<
typename MT
1348 template<
typename MT
1380 template<
typename MT
1412 template<
typename MT
1443 template<
typename MT
1474 template<
typename MT
1506 template<
typename MT
1535 template<
typename MT
1564 template<
typename MT
1596 template<
typename MT
1628 template<
typename MT
1660 template<
typename MT
1689 template<
typename MT
1721 template<
typename MT
1750 template<
typename MT
1779 template<
typename MT
1808 template<
typename MT
1840 template<
typename MT
1869 template<
typename MT
1901 template<
typename MT
1930 template<
typename MT
1959 template<
typename MT
1991 template<
typename MT
2023 template<
typename MT
2052 template<
typename MT
2082 template<
typename MT
2113 template<
typename MT
2136 template<
typename MT
2159 template<
typename MT
2182 template<
typename MT
2205 template<
typename MT
2235 template<
typename MT
2241 return sm.operand();
2265 template<
typename MT
2289 template<
typename MT
2312 template<
typename MT
2334 template<
typename MT,
typename OP,
bool SO >
2335 struct Rows< SMatMapExpr<MT,OP,SO> >
2352 template<
typename MT,
typename OP,
bool SO >
2353 struct Columns< SMatMapExpr<MT,OP,SO> >
2370 template<
typename MT,
bool SO >
2375 template<
typename MT,
bool SO >
2380 template<
typename MT,
bool SO >
2385 template<
typename MT,
bool SO >
2390 template<
typename MT,
bool SO >
2395 template<
typename MT,
bool SO >
2400 template<
typename MT,
bool SO >
2405 template<
typename MT,
bool SO >
2410 template<
typename MT,
bool SO >
2415 template<
typename MT,
bool SO >
2420 template<
typename MT,
bool SO >
2425 template<
typename MT,
bool SO >
2430 template<
typename MT,
typename ET,
bool SO >
2435 template<
typename MT,
bool SO >
2440 template<
typename MT,
bool SO >
2445 template<
typename MT,
bool SO >
2450 template<
typename MT,
bool SO >
2455 template<
typename MT,
bool SO >
2460 template<
typename MT,
bool SO >
2465 template<
typename MT,
bool SO >
2470 template<
typename MT,
bool SO >
2475 template<
typename MT,
bool SO >
2480 template<
typename MT,
bool SO >
2485 template<
typename MT,
bool SO >
2490 template<
typename MT,
bool SO >
2495 template<
typename MT,
bool SO >
2500 template<
typename MT,
bool SO >
2505 template<
typename MT,
bool SO >
2510 template<
typename MT,
bool SO >
2515 template<
typename MT,
bool SO >
2520 template<
typename MT,
bool SO >
2525 template<
typename MT,
bool SO >
2530 template<
typename MT,
bool SO >
2548 template<
typename MT,
bool SO >
2553 template<
typename MT,
bool SO >
2558 template<
typename MT,
bool SO >
2563 template<
typename MT,
bool SO >
2568 template<
typename MT,
bool SO >
2573 template<
typename MT,
bool SO >
2578 template<
typename MT,
bool SO >
2583 template<
typename MT,
bool SO >
2585 :
public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
2588 template<
typename MT,
bool SO >
2593 template<
typename MT,
bool SO >
2598 template<
typename MT,
bool SO >
2603 template<
typename MT,
bool SO >
2608 template<
typename MT,
typename ET,
bool SO >
2613 template<
typename MT,
bool SO >
2618 template<
typename MT,
bool SO >
2623 template<
typename MT,
bool SO >
2628 template<
typename MT,
bool SO >
2633 template<
typename MT,
bool SO >
2638 template<
typename MT,
bool SO >
2643 template<
typename MT,
bool SO >
2648 template<
typename MT,
bool SO >
2653 template<
typename MT,
bool SO >
2658 template<
typename MT,
bool SO >
2663 template<
typename MT,
bool SO >
2668 template<
typename MT,
bool SO >
2673 template<
typename MT,
bool SO >
2678 template<
typename MT,
bool SO >
2683 template<
typename MT,
bool SO >
2688 template<
typename MT,
bool SO >
2693 template<
typename MT,
bool SO >
2698 template<
typename MT,
bool SO >
2703 template<
typename MT,
bool SO >
2708 template<
typename MT,
bool SO >
2726 template<
typename MT,
typename OP,
bool SO >
2727 struct IsLower< SMatMapExpr<MT,OP,SO> >
2744 template<
typename MT,
bool SO >
2749 template<
typename MT,
bool SO >
2750 struct IsUniLower< SMatMapExpr<MT,Floor,SO> >
2754 template<
typename MT,
bool SO >
2759 template<
typename MT,
bool SO >
2760 struct IsUniLower< SMatMapExpr<MT,Trunc,SO> >
2764 template<
typename MT,
bool SO >
2765 struct IsUniLower< SMatMapExpr<MT,Round,SO> >
2769 template<
typename MT,
bool SO >
2774 template<
typename MT,
bool SO >
2779 template<
typename MT,
bool SO >
2784 template<
typename MT,
bool SO >
2789 template<
typename MT,
typename ET,
bool SO >
2790 struct IsUniLower< SMatMapExpr<MT,Pow<ET>,SO> >
2807 template<
typename MT,
typename OP,
bool SO >
2825 template<
typename MT,
typename OP,
bool SO >
2826 struct IsUpper< SMatMapExpr<MT,OP,SO> >
2843 template<
typename MT,
bool SO >
2848 template<
typename MT,
bool SO >
2849 struct IsUniUpper< SMatMapExpr<MT,Floor,SO> >
2853 template<
typename MT,
bool SO >
2858 template<
typename MT,
bool SO >
2859 struct IsUniUpper< SMatMapExpr<MT,Trunc,SO> >
2863 template<
typename MT,
bool SO >
2864 struct IsUniUpper< SMatMapExpr<MT,Round,SO> >
2868 template<
typename MT,
bool SO >
2873 template<
typename MT,
bool SO >
2878 template<
typename MT,
bool SO >
2883 template<
typename MT,
bool SO >
2888 template<
typename MT,
typename ET,
bool SO >
2889 struct IsUniUpper< SMatMapExpr<MT,Pow<ET>,SO> >
2906 template<
typename MT,
typename OP,
bool SO >
Header file for the UnderlyingNumeric type trait.
Generic wrapper for the trunc() function.
Definition: Trunc.h:62
Pointer difference type of the Blaze library.
decltype(auto) acosh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic cosine for each single element of the dense matrix dm...
Definition: DMatMapExpr.h:2033
Header file for auxiliary alias declarations.
Generic wrapper for the ceil() function.
Definition: Ceil.h:62
decltype(auto) exp10(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1696
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:62
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
EnableIf_< IsDenseMatrix< MT1 > > smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:196
Header file for basic type definitions.
Operation operation() const
Returns a copy of the custom operation.
Definition: SMatMapExpr.h:467
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: SMatMapExpr.h:420
Generic wrapper for the sin() function.
Definition: Sin.h:62
Generic wrapper for the conj() function.
Definition: Conj.h:62
Generic wrapper for the invsqrt() function.
Definition: InvSqrt.h:62
EnableIf_< IsDenseMatrix< MT1 > > smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:164
Header file for the serial shim.
decltype(auto) real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition: DMatMapExpr.h:1387
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:63
ReturnType value() const
Access to the current value of the sparse element.
Definition: SMatMapExpr.h:244
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
IfTrue_< useAssign, const ResultType, const SMatMapExpr &> CompositeType
Data type for composite expression templates.
Definition: SMatMapExpr.h:160
IteratorType it_
Iterator over the elements of the sparse matrix expression.
Definition: SMatMapExpr.h:294
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: SMatMapExpr.h:433
Header file for the IsSame and IsStrictlySame type traits.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatMapExpr.h:491
UnaryMapTrait_< RT, OP > ResultType
Result type for expression template evaluations.
Definition: SMatMapExpr.h:151
decltype(auto) ceil(const DenseMatrix< MT, SO > &dm)
Applies the ceil() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1234
Generic wrapper for the clamp() function.
Definition: Clamp.h:60
Iterator over the elements of the sparse matrix map expression.
Definition: SMatMapExpr.h:172
Generic wrapper for the acosh() function.
Definition: Acosh.h:62
decltype(auto) clamp(const DenseMatrix< MT, SO > &dm, const DT &min, const DT &max)
Restricts each single element of the dense matrix dm to the range .
Definition: DMatMapExpr.h:1576
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SMatMapExpr.h:276
Header file for the And class template.
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1762
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: SMatMapExpr.h:356
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SMatMapExpr.h:287
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: SMatMapExpr.h:367
Header file for the Computation base class.
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:140
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3086
size_t index() const
Access to the current index of the sparse element.
Definition: SMatMapExpr.h:254
decltype(std::declval< OP >()(std::declval< RN >())) ReturnType
Return type for expression template evaluations.
Definition: SMatMapExpr.h:157
Header file for the RequiresEvaluation type trait.
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SMatMapExpr.h:377
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
Operand operand() const noexcept
Returns the sparse matrix operand.
Definition: SMatMapExpr.h:457
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1809
decltype(auto) acos(const DenseMatrix< MT, SO > &dm)
Computes the inverse cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1972
EnableIf_< IsDenseMatrix< MT1 > > smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:133
Expression object for the sparse matrix map() function.The SMatMapExpr class represents the compile t...
Definition: Forward.h:112
Operand sm_
Sparse matrix of the absolute value expression.
Definition: SMatMapExpr.h:508
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
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SMatMapExpr.h:153
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatMapExpr.h:152
decltype(auto) erf(const DenseMatrix< MT, SO > &dm)
Computes the error function for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2184
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:363
Header file for the SparseMatrix base class.
Constraint on the data type.
Generic wrapper for the abs() function.
Definition: Abs.h:62
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:72
OP op_
The custom unary operation.
Definition: SMatMapExpr.h:295
Header file for the MatMapExpr base class.
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
If_< IsExpression< MT >, const MT, const MT &> Operand
Composite data type of the sparse matrix expression.
Definition: SMatMapExpr.h:163
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:62
Header file for the ValueIndexPair class.
Header file for the IsStrictlyUpper type trait.
Header file for the unary map trait.
Header file for the IsSymmetric type trait.
decltype(auto) cos(const DenseMatrix< MT, SO > &dm)
Computes the cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1940
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
decltype(auto) ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatMapExpr.h:1359
Header file for the If class template.
Generic wrapper for the imag() function.
Definition: Imag.h:59
Generic wrapper for the exp10() function.
Definition: Exp10.h:62
decltype(auto) exp2(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1667
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SMatMapExpr.h:154
decltype(auto) sinh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1882
decltype(auto) asin(const DenseMatrix< MT, SO > &dm)
Computes the inverse sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1853
decltype(auto) cosh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2001
EnableIf_< IsDenseMatrix< MT1 > > smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:102
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SMatMapExpr.h:265
decltype(auto) cbrt(const DenseMatrix< MT, SO > &dm)
Computes the cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1512
#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
Header file for the Columns type trait.
Generic wrapper for the log10() function.
Definition: Log10.h:62
decltype(auto) trunc(const DenseMatrix< MT, SO > &dm)
Applies the trunc() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1263
Header file for the Not class template.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
Header file for all functors.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for the IsLower type trait.
Generic wrapper for the exp2() function.
Definition: Exp2.h:62
Generic wrapper for the asin() function.
Definition: Asin.h:62
decltype(auto) atan(const DenseMatrix< MT, SO > &dm)
Computes the inverse tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2091
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SMatMapExpr.h:182
decltype(auto) asinh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1911
Generic wrapper for the erf() function.
Definition: Erf.h:62
ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: SMatMapExpr.h:202
Constraints on the storage order of matrix types.
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.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatMapExpr.h:324
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
OppositeType_< MT > OT
Opposite type of the sparse matrix expression.
Definition: SMatMapExpr.h:110
Constraint on the data type.
Evaluation of the underlying numeric element type of a given data type.Via this type trait it is poss...
Definition: UnderlyingNumeric.h:81
Header file for all forward declarations for expression class templates.
Generic wrapper for the floor() function.
Definition: Floor.h:62
decltype(auto) exp(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1638
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
decltype(auto) abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1176
decltype(auto) log(const DenseMatrix< MT, SO > &dm)
Computes the natural logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1728
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
decltype(auto) floor(const DenseMatrix< MT, SO > &dm)
Applies the floor() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1205
decltype(auto) pow(const DenseMatrix< MT, SO > &dm, ET exp)
Computes the exponential value for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1607
decltype(auto) round(const DenseMatrix< MT, SO > &dm)
Applies the round() function to each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1292
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: SMatMapExpr.h:446
decltype(auto) tanh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2123
decltype(auto) forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1147
Header file for run time assertion macros.
Generic wrapper for the pow() function.
Definition: Forward.h:84
Generic wrapper for the atanh() function.
Definition: Atanh.h:62
Generic wrapper for the invcbrt() function.
Definition: InvCbrt.h:62
Generic wrapper for the real() function.
Definition: Real.h:59
Generic wrapper for the asinh() function.
Definition: Asinh.h:62
decltype(auto) invcbrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse cubic root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1544
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SMatMapExpr.h:387
#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
Generic wrapper for the tan() function.
Definition: Tan.h:62
Generic wrapper for the log() function.
Definition: Log.h:62
decltype(auto) atanh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic tangent for each single element of the dense matrix dm...
Definition: DMatMapExpr.h:2155
#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
Compile time type negation.The Not alias declaration negates the given compile time condition...
Definition: Not.h:70
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Generic wrapper for the erfc() function.
Definition: Erfc.h:62
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:819
Generic wrapper for the cos() function.
Definition: Cos.h:62
#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
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: SMatMapExpr.h:408
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatMapExpr.h:479
Header file for the RemoveReference type trait.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:263
ResultType_< MT > RT
Result type of the sparse matrix expression.
Definition: SMatMapExpr.h:109
typename T::Iterator Iterator_
Alias declaration for nested Iterator type definitions.The Iterator_ alias declaration provides a con...
Definition: Aliases.h:183
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SMatMapExpr.h:501
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3082
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:790
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SMatMapExpr.h:339
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatMapExpr.h:224
decltype(auto) sin(const DenseMatrix< MT, SO > &dm)
Computes the sine for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1821
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SMatMapExpr.h:397
ConstIterator_< RemoveReference_< Operand > > IteratorType
Iterator type of the sparse matrix expression.
Definition: SMatMapExpr.h:180
decltype(auto) erfc(const DenseMatrix< MT, SO > &dm)
Computes the complementary error function for each single element of the dense matrix dm...
Definition: DMatMapExpr.h:2213
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
typename UnaryMapTrait< T, OP >::Type UnaryMapTrait_
Auxiliary alias declaration for the UnaryMapTrait class template.The UnaryMapTrait_ alias declaration...
Definition: UnaryMapTrait.h:156
decltype(auto) sqrt(const DenseMatrix< MT, SO > &dm)
Computes the square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1448
SMatMapExpr(const MT &sm, OP op) noexcept
Constructor for the SMatMapExpr class.
Definition: SMatMapExpr.h:311
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
Generic wrapper for the acos() function.
Definition: Acos.h:62
decltype(auto) tan(const DenseMatrix< MT, SO > &dm)
Computes the tangent for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:2062
Generic wrapper for the atan() function.
Definition: Atan.h:62
Generic wrapper for the round() function.
Definition: Round.h:62
Expression object for sparse matrix transpositions.The SMatTransExpr class represents the compile tim...
Definition: Forward.h:123
Generic wrapper for the sinh() function.
Definition: Sinh.h:62
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:75
OP Operation
Data type of the custom unary operation.
Definition: SMatMapExpr.h:166
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:75
IteratorCategory iterator_category
The iterator category.
Definition: SMatMapExpr.h:189
decltype(auto) log10(const DenseMatrix< MT, SO > &dm)
Computes the common logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1792
Generic wrapper for the log2() function.
Definition: Log2.h:62
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
decltype(auto) imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatMapExpr.h:1416
Header file for the IsUpper type trait.
Generic wrapper for the cosh() function.
Definition: Cosh.h:62
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1321
decltype(auto) log2(const DenseMatrix< MT, SO > &dm)
Computes the binary logarithm for each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1760
decltype(auto) invsqrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1480
Generic wrapper for the tanh() function.
Definition: Tanh.h:62
Header file for the IsHermitian type trait.
Generic wrapper for the exp() function.
Definition: Exp.h:62
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
ConstIterator & operator++()
Pre-increment operator.
Definition: SMatMapExpr.h:213
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
ReturnType_< MT > RN
Return type of the sparse matrix expression.
Definition: SMatMapExpr.h:111
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
Operation op_
The custom unary operation.
Definition: SMatMapExpr.h:509
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs...
Definition: DMatDMatMapExpr.h:1133
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatMapExpr.h:234