35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECFOREACHEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECFOREACHEXPR_H_
96 class SVecForEachExpr :
public SparseVector< SVecForEachExpr<VT,OP,TF>, TF >
97 ,
private VecForEachExpr
117 template<
typename VT2 >
120 enum :
bool { value = useAssign };
133 template<
typename VT2 >
134 struct UseSMPAssign {
135 enum :
bool { value = ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign };
148 typedef decltype( std::declval<OP>()( std::declval<RN>() ) )
ReturnType;
216 return Element(
op_( it_->value() ), it_->index() );
236 return op_( it_->value() );
257 return it_ == rhs.
it_;
268 return it_ != rhs.
it_;
278 inline DifferenceType
operator-(
const ConstIterator& rhs )
const {
279 return it_ - rhs.
it_;
293 enum :
bool { smpAssignable = VT::smpAssignable };
328 if( index >=
sv_.size() ) {
331 return (*
this)[index];
360 inline size_t size() const noexcept {
371 return sv_.nonZeros();
437 template<
typename T >
438 inline bool canAlias(
const T* alias )
const noexcept {
439 return sv_.canAlias( alias );
449 template<
typename T >
450 inline bool isAliased(
const T* alias )
const noexcept {
451 return sv_.isAliased( alias );
461 return sv_.canSMPAssign();
485 template<
typename VT2 >
497 const RT tmp(
serial( rhs.sv_ ) );
498 assign( ~lhs,
forEach( tmp, rhs.op_ ) );
518 template<
typename VT2 >
529 assign( ~lhs, rhs.sv_ );
531 const Iterator
end( (~lhs).
end() );
532 for( Iterator element=(~lhs).
begin(); element!=
end; ++element ) {
533 element->value() = rhs.op_( element->value() );
553 template<
typename VT2 >
554 friend inline EnableIf_< And< UseAssign<VT2>
555 , Not< IsSame< UnderlyingNumeric<VT>, UnderlyingNumeric<VT2> > > > >
566 const RT tmp(
serial( rhs.sv_ ) );
567 (~lhs).reserve( tmp.nonZeros() );
568 assign( ~lhs,
forEach( tmp, rhs.op_ ) );
587 template<
typename VT2 >
588 friend inline EnableIf_< UseAssign<VT2> >
599 const RT tmp(
serial( rhs.sv_ ) );
600 addAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
623 template<
typename VT2 >
624 friend inline EnableIf_< UseAssign<VT2> >
635 const RT tmp(
serial( rhs.sv_ ) );
636 subAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
659 template<
typename VT2 >
660 friend inline EnableIf_< UseAssign<VT2> >
671 const RT tmp(
serial( rhs.sv_ ) );
672 multAssign( ~lhs,
forEach( tmp, rhs.op_ ) );
695 template<
typename VT2 >
696 friend inline EnableIf_< UseSMPAssign<VT2> >
707 const RT tmp( rhs.sv_ );
731 template<
typename VT2 >
732 friend inline EnableIf_< UseSMPAssign<VT2> >
743 const RT tmp( rhs.sv_ );
767 template<
typename VT2 >
768 friend inline EnableIf_< UseSMPAssign<VT2> >
779 const RT tmp( rhs.sv_ );
803 template<
typename VT2 >
804 friend inline EnableIf_< UseSMPAssign<VT2> >
815 const RT tmp( rhs.sv_ );
861 template<
typename VT
890 template<
typename VT
918 template<
typename VT
946 template<
typename VT
974 template<
typename VT
1011 template<
typename VT
1039 template<
typename VT
1067 template<
typename VT
1098 template<
typename VT
1129 template<
typename VT
1160 template<
typename VT
1191 template<
typename VT
1221 template<
typename VT
1224 inline const SVecForEachExpr<VT,Clip<DT>,TF>
1229 return SVecForEachExpr<VT,Clip<DT>,TF>( ~sv,
Clip<DT>(
min,
max ) );
1252 template<
typename VT
1283 template<
typename VT
1314 template<
typename VT
1345 template<
typename VT
1373 template<
typename VT
1404 template<
typename VT
1432 template<
typename VT
1460 template<
typename VT
1488 template<
typename VT
1519 template<
typename VT
1547 template<
typename VT
1578 template<
typename VT
1606 template<
typename VT
1634 template<
typename VT
1665 template<
typename VT
1696 template<
typename VT
1724 template<
typename VT
1752 template<
typename VT
1782 template<
typename VT
1784 inline const SVecForEachExpr<VT,Abs,TF>&
abs(
const SVecForEachExpr<VT,Abs,TF>& sv )
1805 template<
typename VT
1807 inline const SVecForEachExpr<VT,Floor,TF>&
floor(
const SVecForEachExpr<VT,Floor,TF>& sv )
1828 template<
typename VT
1830 inline const SVecForEachExpr<VT,Ceil,TF>&
ceil(
const SVecForEachExpr<VT,Ceil,TF>& sv )
1858 template<
typename VT
1860 inline typename SVecForEachExpr<VT,Conj,TF>::Operand
conj(
const SVecForEachExpr<VT,Conj,TF>& sv )
1864 return sv.operand();
1888 template<
typename VT
1890 inline const SVecTransExpr<VT,!TF>
conj(
const SVecTransExpr<SVecForEachExpr<VT,Conj,TF>,!TF>& sv )
1894 return SVecTransExpr<VT,!TF>( sv.operand().operand() );
1911 template<
typename VT
1913 inline const SVecForEachExpr<VT,Real,TF>&
real(
const SVecForEachExpr<VT,Real,TF>& sv )
1933 template<
typename VT,
typename OP,
bool TF >
1950 template<
typename VT >
1955 using Type = If_< And< IsSparseVector<VT>, IsColumnVector<VT> >
1956 , SVecForEachExpr<VT,Abs,false>
1966 template<
typename VT >
1971 using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT> >
1972 , SVecForEachExpr<VT,Abs,true>
1982 template<
typename VT >
1987 using Type = If_< And< IsSparseVector<VT>, IsColumnVector<VT> >
1988 , Operand_< SVecForEachExpr<VT,Conj,false> >
1998 template<
typename VT >
2003 using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT> >
2004 , Operand_< SVecForEachExpr<VT,Conj,true> >
2014 template<
typename VT >
2015 struct SVecForEachExprTrait< SVecTransExpr<
SVecForEachExpr<VT,Conj,true>, false >, Conj >
2019 using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT> >
2020 , SVecTransExpr<VT,false>
2030 template<
typename VT >
2031 struct TSVecForEachExprTrait< SVecTransExpr<
SVecForEachExpr<VT,Conj,false>, true >, Conj >
2035 using Type = If_< And< IsSparseVector<VT>, IsColumnVector<VT> >
2036 , SVecTransExpr<VT,true>
2046 template<
typename VT >
2051 using Type = If_< And< IsSparseVector<VT>, IsColumnVector<VT> >
2052 , SVecForEachExpr<VT,Real,false>
2062 template<
typename VT >
2067 using Type = If_< And< IsSparseVector<VT>, IsRowVector<VT> >
2068 , SVecForEachExpr<VT,Real,true>
2078 template<
typename VT,
typename OP,
bool TF,
bool AF >
2083 using Type = ForEachExprTrait_< SubvectorExprTrait_<const VT,AF>, OP >;
ReferenceType reference
Reference return type.
Definition: SVecForEachExpr.h:183
Header file for the UnderlyingNumeric type trait.
Pointer difference type of the Blaze library.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SVecForEachExpr.h:145
const DMatForEachExpr< MT, Conj, SO > conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatForEachExpr.h:1158
Header file for auxiliary alias declarations.
Generic wrapper for the ceil() function.
Definition: Ceil.h:62
const DMatForEachExpr< MT, Log, SO > log(const DenseMatrix< MT, SO > &dm)
Computes the natural logarithm for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1498
const DMatForEachExpr< MT, Sin, SO > sin(const DenseMatrix< MT, SO > &dm)
Computes the sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1557
Generic wrapper for the cbrt() function.
Definition: Cbrt.h:62
Header file for basic type definitions.
Header file for the SparseVector base class.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecForEachExpr.h:278
IteratorCategory iterator_category
The iterator category.
Definition: SVecForEachExpr.h:180
const DMatForEachExpr< MT, Log10, SO > log10(const DenseMatrix< MT, SO > &dm)
Computes the common logarithm for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1529
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:160
Header file for the serial shim.
const DMatForEachExpr< MT, Tanh, SO > tanh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic tangent for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1849
const CTransExprTrait_< MT > ctrans(const DenseMatrix< MT, SO > &dm)
Returns the conjugate transpose matrix of dm.
Definition: DMatForEachExpr.h:1195
Header file for the IsSame and IsStrictlySame type traits.
Header file for the ForEachExprTrait class template.
const DMatForEachExpr< MT, Cos, SO > cos(const DenseMatrix< MT, SO > &dm)
Computes the cosine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1672
ValueType * PointerType
Pointer return type.
Definition: SVecForEachExpr.h:175
ConstIterator find(size_t index) const
Searches for a specific vector element.
Definition: SVecForEachExpr.h:381
const DMatForEachExpr< MT, Atan, SO > atan(const DenseMatrix< MT, SO > &dm)
Computes the inverse tangent for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1818
Generic wrapper for the acosh() function.
Definition: Acosh.h:62
const DMatForEachExpr< MT, Imag, SO > imag(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the imaginary part of each single element of dm.
Definition: DMatForEachExpr.h:1251
ConstIterator upperBound(size_t index) const
Returns an iterator to the first index greater then the given index.
Definition: SVecForEachExpr.h:405
EnableIf_< IsDenseVector< VT1 > > smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:193
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecForEachExpr.h:360
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:1669
ForEachTrait_< VT, OP > ResultType
Result type for expression template evaluations.
Definition: SVecForEachExpr.h:143
const Element operator*() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecForEachExpr.h:215
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:723
const DMatForEachExpr< MT, Sinh, SO > sinh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1616
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:138
Header file for the RequiresEvaluation type trait.
ResultType_< VT > RT
Result type of the sparse vector expression.
Definition: SVecForEachExpr.h:102
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecForEachExpr.h:327
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1716
IteratorType it_
Iterator over the elements of the sparse vector expression.
Definition: SVecForEachExpr.h:285
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:129
ConstIterator_< RemoveReference_< Operand > > IteratorType
Iterator type of the sparse vector expression.
Definition: SVecForEachExpr.h:171
const DMatForEachExpr< MT, Exp, SO > exp(const DenseMatrix< MT, SO > &dm)
Computes for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1467
Constraint on the data type.
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:343
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
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
typename ForEachTrait< T, OP >::Type ForEachTrait_
Auxiliary alias declaration for the ForEachTrait class template.The ForEachTrait_ alias declaration p...
Definition: ForEachTrait.h:146
const DMatForEachExpr< MT, Acosh, SO > acosh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic cosine for each single element of the dense matrix dm...
Definition: DMatForEachExpr.h:1762
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecForEachExpr.h:370
Generic wrapper for the sqrt() function.
Definition: Sqrt.h:62
Header file for the ValueIndexPair class.
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecForEachExpr.h:144
typename CTransExprTrait< T >::Type CTransExprTrait_
Auxiliary alias declaration for the CTransExprTrait class template.The CTransExprTrait_ alias declara...
Definition: CTransExprTrait.h:143
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Generic wrapper for the imag() function.
Definition: Imag.h:59
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecForEachExpr.h:177
const DMatForEachExpr< MT, Abs, SO > abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1074
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
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:98
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecForEachExpr.h:267
#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
const DMatForEachExpr< MT, OP, SO > forEach(const DenseMatrix< MT, SO > &dm, OP op)
Evaluates the given custom operation on each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1046
bool canSMPAssign() const noexcept
Returns whether the expression can be used in SMP assignments.
Definition: SVecForEachExpr.h:460
Generic wrapper for the log10() function.
Definition: Log10.h:62
Header file for the Not class template.
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
const DMatForEachExpr< MT, InvCbrt, SO > invcbrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse cubic root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1375
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
ConstIterator end() const
Returns an iterator just past the last non-zero element of the sparse vector.
Definition: SVecForEachExpr.h:350
size_t index() const
Access to the current index of the sparse element.
Definition: SVecForEachExpr.h:245
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:61
Generic wrapper for the asin() function.
Definition: Asin.h:62
Constraint on the data type.
const DMatForEachExpr< MT, Floor, SO > floor(const DenseMatrix< MT, SO > &dm)
Applies the floor() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1102
const ConstIterator * operator->() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecForEachExpr.h:225
const DMatForEachExpr< MT, Erf, SO > erf(const DenseMatrix< MT, SO > &dm)
Computes the error function for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1908
#define BLAZE_CONSTRAINT_MUST_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:60
const DMatForEachExpr< MT, Tan, SO > tan(const DenseMatrix< MT, SO > &dm)
Computes the tangent for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1790
Generic wrapper for the erf() function.
Definition: Erf.h:62
const DMatForEachExpr< MT, Pow< ET >, SO > pow(const DenseMatrix< MT, SO > &dm, ET exp)
Computes the exponential value for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1437
Header file for the exception macros of the math module.
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecForEachExpr.h:204
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.
Constraint on the data type.
Generic wrapper for the floor() function.
Definition: Floor.h:62
const DMatForEachExpr< MT, Cosh, SO > cosh(const DenseMatrix< MT, SO > &dm)
Computes the hyperbolic cosine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1731
const DMatForEachExpr< MT, Sqrt, SO > sqrt(const DenseMatrix< MT, SO > &dm)
Computes the square root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1282
If_< IsExpression< VT >, const VT, const VT & > Operand
Composite data type of the sparse vector expression.
Definition: SVecForEachExpr.h:154
Header file for the EnableIf class template.
const DMatForEachExpr< MT, Real, SO > real(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the real part of each single element of dm.
Definition: DMatForEachExpr.h:1223
const DMatForEachExpr< MT, Atanh, SO > atanh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic tangent for each single element of the dense matrix dm...
Definition: DMatForEachExpr.h:1880
Generic wrapper for the clip() function.
Definition: Clip.h:60
const DMatForEachExpr< MT, Acos, SO > acos(const DenseMatrix< MT, SO > &dm)
Computes the inverse cosine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1703
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecForEachExpr.h:450
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2642
DifferenceType difference_type
Difference between two iterators.
Definition: SVecForEachExpr.h:184
Header file for run time assertion macros.
const DMatForEachExpr< MT, InvSqrt, SO > invsqrt(const DenseMatrix< MT, SO > &dm)
Computes the inverse square root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1313
Generic wrapper for the pow() function.
Definition: Forward.h:72
const DMatForEachExpr< MT, Cbrt, SO > cbrt(const DenseMatrix< MT, SO > &dm)
Computes the cubic root of each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1344
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
Operand sv_
Sparse vector of the for-each expression.
Definition: SVecForEachExpr.h:467
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecForEachExpr.h:438
const DMatForEachExpr< MT, Asin, SO > asin(const DenseMatrix< MT, SO > &dm)
Computes the inverse sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1588
Operation operation() const
Returns a copy of the custom operation.
Definition: SVecForEachExpr.h:426
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:160
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecForEachExpr.h:314
#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
ConstIterator begin() const
Returns an iterator to the first non-zero element of the sparse vector.
Definition: SVecForEachExpr.h:340
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
ValueType & ReferenceType
Reference return type.
Definition: SVecForEachExpr.h:176
ValueIndexPair< ElementType > Element
Element type of the sparse vector expression.
Definition: SVecForEachExpr.h:168
Generic wrapper for the erfc() function.
Definition: Erfc.h:62
Header file for the VecForEachExpr base class.
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
ConstIterator lowerBound(size_t index) const
Returns an iterator to the first index not less then the given index.
Definition: SVecForEachExpr.h:393
Header file for the RemoveReference type trait.
const DMatForEachExpr< MT, Clip< DT >, SO > clip(const DenseMatrix< MT, SO > &dm, const DT &min, const DT &max)
Restricts each single element of the dense matrix dm to the range .
Definition: DMatForEachExpr.h:1407
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
SVecForEachExpr< VT, OP, TF > This
Type of this SVecForEachExpr instance.
Definition: SVecForEachExpr.h:142
typename T::Iterator Iterator_
Alias declaration for nested Iterator type definitions.The Iterator_ alias declaration provides a con...
Definition: Aliases.h:183
PointerType pointer
Pointer return type.
Definition: SVecForEachExpr.h:182
Element ValueType
Type of the underlying pointers.
Definition: SVecForEachExpr.h:174
const DMatForEachExpr< MT, Erfc, SO > erfc(const DenseMatrix< MT, SO > &dm)
Computes the complementary error function for each single element of the dense matrix dm...
Definition: DMatForEachExpr.h:1936
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
Iterator over the elements of the sparse vector for-each expression.
Definition: SVecForEachExpr.h:163
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:70
ConstIterator(IteratorType it, OP op)
Constructor for the ConstIterator class.
Definition: SVecForEachExpr.h:193
ReturnType_< VT > RN
Return type of the sparse vector expression.
Definition: SVecForEachExpr.h:103
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:950
Header file for the IsComputation type trait class.
Operation op_
The custom unary operation.
Definition: SVecForEachExpr.h:468
Generic wrapper for the acos() function.
Definition: Acos.h:62
OP op_
The custom unary operation.
Definition: SVecForEachExpr.h:286
Header file for the for-each trait.
Generic wrapper for the atan() function.
Definition: Atan.h:62
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:110
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
const DMatForEachExpr< MT, Asinh, SO > asinh(const DenseMatrix< MT, SO > &dm)
Computes the inverse hyperbolic sine for each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1644
SVecForEachExpr(const VT &sv, OP op) noexcept
Constructor for the SVecForEachExpr class.
Definition: SVecForEachExpr.h:302
Generic wrapper for the sinh() function.
Definition: Sinh.h:62
Header file for the SubvectorExprTrait class template.
Expression object for the sparse vector forEach() function.The SVecForEachExpr class represents the c...
Definition: Forward.h:116
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the CTransExprTrait class template.
Generic wrapper for the cosh() function.
Definition: Cosh.h:62
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecForEachExpr.h:173
Generic wrapper for the tanh() function.
Definition: Tanh.h:62
Generic wrapper for the exp() function.
Definition: Exp.h:62
OP Operation
Data type of the custom unary operation.
Definition: SVecForEachExpr.h:157
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecForEachExpr.h:235
Header file for the Size type trait.
Operand operand() const noexcept
Returns the sparse vector operand.
Definition: SVecForEachExpr.h:416
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:63
IfTrue_< useAssign, const ResultType, const SVecForEachExpr & > CompositeType
Data type for composite expression templates.
Definition: SVecForEachExpr.h:151
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecForEachExpr.h:256
#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
Compile time check whether the given type is an expression template.This type trait class tests wheth...
Definition: IsExpression.h:71
const DMatForEachExpr< MT, Ceil, SO > ceil(const DenseMatrix< MT, SO > &dm)
Applies the ceil() function to each single element of the dense matrix dm.
Definition: DMatForEachExpr.h:1130
ValueType value_type
Type of the underlying pointers.
Definition: SVecForEachExpr.h:181
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.