35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECEVALEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECEVALEXPR_H_
86 class SVecEvalExpr :
public SparseVector< SVecEvalExpr<VT,TF>, TF >
143 return sv_.nonZeros();
163 template<
typename T >
165 return sv_.canAlias( alias );
175 template<
typename T >
177 return sv_.isAliased( alias );
200 template<
typename VT2 >
226 template<
typename VT2 >
252 template<
typename VT2 >
278 template<
typename VT2 >
304 template<
typename VT2 >
330 template<
typename VT2 >
356 template<
typename VT2 >
382 template<
typename VT2 >
429 template<
typename VT
459 template<
typename VT
461 inline const SVecEvalExpr<VT,TF>
eval(
const SVecEvalExpr<VT,TF>& sv )
479 template<
typename VT >
480 struct SVecEvalExprTrait< SVecEvalExpr<VT,false> >
484 typedef typename SelectType< IsSparseVector<VT>::value && IsColumnVector<VT>::value
485 , SVecEvalExpr<VT,false>
486 , INVALID_TYPE >::Type Type;
495 template<
typename VT >
496 struct TSVecEvalExprTrait< SVecEvalExpr<VT,true> >
500 typedef typename SelectType< IsSparseVector<VT>::value && IsRowVector<VT>::value
501 , SVecEvalExpr<VT,true>
502 , INVALID_TYPE >::Type Type;
511 template<
typename VT,
bool TF >
512 struct SubvectorExprTrait< SVecEvalExpr<VT,TF> >
516 typedef typename EvalExprTrait< typename SubvectorExprTrait<const VT>::Type >::Type Type;
VT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SVecEvalExpr.h:94
Operand sv_
Sparse vector of the evaluation expression.
Definition: SVecEvalExpr.h:183
Header file for the SparseVector base class.
Header file for the IsRowVector type trait.
Expression object for the forced evaluation of sparse vectors.The SVecEvalExpr class represents the c...
Definition: Forward.h:110
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecEvalExpr.h:142
Header file for the Computation base class.
VT::ResultType ResultType
Result type for expression template evaluations.
Definition: SVecEvalExpr.h:93
Header file for the RequiresEvaluation type trait.
Header file for the VecEvalExpr base class.
VT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: SVecEvalExpr.h:96
Constraint on the data type.
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
#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:79
Constraint on the data type.
size_t size() const
Returns the current size/dimension of the vector.
Definition: SVecEvalExpr.h:132
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2372
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:269
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsSparseVector type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2374
Header file for run time assertion macros.
Utility type for generic codes.
SVecEvalExpr(const VT &sv)
Constructor for the SVecEvalExpr class.
Definition: SVecEvalExpr.h:110
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
Header file for the EvalExprTrait class template.
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
Header file for the TSVecEvalExprTrait class template.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecEvalExpr.h:176
const DMatEvalExpr< MT, SO > eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:395
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecEvalExpr.h:99
VT::ElementType ElementType
Resulting element type.
Definition: SVecEvalExpr.h:95
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
Composite data type of the sparse vector expression.
Definition: SVecEvalExpr.h:102
Header file for the IsComputation type trait class.
Operand operand() const
Returns the sparse vector operand.
Definition: SVecEvalExpr.h:152
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:105
#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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2370
Header file for basic type definitions.
Header file for the SubvectorExprTrait class template.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecEvalExpr.h:121
Header file for the SVecEvalExprTrait class template.
SVecEvalExpr< VT, TF > This
Type of this SVecEvalExpr instance.
Definition: SVecEvalExpr.h:92
Header file for the IsColumnVector type trait.
#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:238
#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
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecEvalExpr.h:164