35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECSCALARMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_SVECSCALARMULTEXPR_H_ 106 template<
typename VT
109 class SVecScalarMultExpr :
public SparseVector< SVecScalarMultExpr<VT,ST,TF>, TF >
110 ,
private VecScalarMultExpr
111 ,
private Computation
144 template<
typename VT2 >
147 enum :
bool { value = useAssign };
160 template<
typename VT2 >
161 struct UseSMPAssign {
162 enum :
bool { value = ( !VT2::smpAssignable || !VT::smpAssignable ) && useAssign };
189 enum :
bool { smpAssignable =
false };
351 inline ReturnType
at(
size_t index )
const {
352 if( index >=
vector_.size() ) {
355 return (*
this)[index];
384 inline size_t size() const noexcept {
461 template<
typename T >
462 inline bool canAlias(
const T* alias )
const noexcept {
463 return vector_.canAlias( alias );
473 template<
typename T >
474 inline bool isAliased(
const T* alias )
const noexcept {
475 return vector_.isAliased( alias );
499 template<
typename VT2 >
507 assign( ~lhs, rhs.vector_ );
508 (~lhs) *= rhs.scalar_;
527 template<
typename VT2 >
535 assign( ~lhs, rhs.vector_ );
536 (~lhs) *= rhs.scalar_;
555 template<
typename VT2 >
556 friend inline EnableIf_< UseAssign<VT2> >
567 const ResultType tmp(
serial( rhs ) );
568 addAssign( ~lhs, tmp );
591 template<
typename VT2 >
592 friend inline EnableIf_< UseAssign<VT2> >
603 const ResultType tmp(
serial( rhs ) );
604 subAssign( ~lhs, tmp );
627 template<
typename VT2 >
628 friend inline EnableIf_< UseAssign<VT2> >
639 const ResultType tmp(
serial( rhs ) );
640 multAssign( ~lhs, tmp );
671 template<
typename VT2 >
672 friend inline EnableIf_< UseSMPAssign<VT2> >
683 const ResultType tmp( rhs );
707 template<
typename VT2 >
708 friend inline EnableIf_< UseSMPAssign<VT2> >
719 const ResultType tmp( rhs );
743 template<
typename VT2 >
744 friend inline EnableIf_< UseSMPAssign<VT2> >
755 const ResultType tmp( rhs );
802 template<
typename VT
804 inline const SVecScalarMultExpr<VT,UnderlyingBuiltin_<VT>,TF>
844 template<
typename T1
878 template<
typename T1
917 template<
typename VT
926 const ElementType len (
length( ~vec ) );
954 template<
typename VT
989 template<
typename VT
998 return vec.leftOperand() * ( vec.rightOperand() * scalar );
1017 template<
typename ST1
1026 return vec.leftOperand() * ( scalar * vec.rightOperand() );
1045 template<
typename VT
1055 return vec.leftOperand() * ( vec.rightOperand() / scalar );
1075 template<
typename VT1
1084 return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1104 template<
typename VT1
1113 return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1133 template<
typename VT1
1141 return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1161 template<
typename VT1
1169 return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1189 template<
typename VT1
1193 inline const MultExprTrait_< SVecScalarMultExpr<VT1,ST,TF>, VT2 >
1198 return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1218 template<
typename VT1
1227 return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1247 template<
typename VT1
1257 return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1277 template<
typename VT1
1280 inline const MultExprTrait_< SVecScalarMultExpr<VT1,ST,false>, VT2 >
1285 return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1305 template<
typename VT1
1313 return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1333 template<
typename VT1
1342 return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1362 template<
typename MT
1371 return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1391 template<
typename VT
1400 return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1420 template<
typename MT
1429 return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1449 template<
typename VT
1453 inline const MultExprTrait_< SVecScalarMultExpr<VT,ST,true>, MT >
1458 return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1474 template<
typename VT,
typename ST,
bool TF >
1475 struct Size< SVecScalarMultExpr<VT,ST,TF> > :
public Size<VT>
1491 template<
typename VT,
typename ST1,
typename ST2 >
1499 , INVALID_TYPE > Type;
1516 template<
typename VT,
typename ST1,
typename ST2 >
1541 template<
typename VT,
typename ST1,
typename ST2 >
1573 template<
typename VT,
typename ST1,
typename ST2 >
1605 template<
typename VT1,
typename VT2,
typename ST >
1631 template<
typename VT1,
typename VT2,
typename ST >
1657 template<
typename VT1,
typename VT2,
typename ST >
1683 template<
typename VT1,
typename ST,
typename VT2 >
1709 template<
typename VT1,
typename ST,
typename VT2 >
1735 template<
typename VT1,
typename ST,
typename VT2 >
1761 template<
typename VT1,
typename ST,
typename VT2 >
1779 template<
typename VT1,
typename VT2,
typename ST >
1797 template<
typename VT1,
typename ST1,
typename VT2,
typename ST2 >
1798 struct SVecSVecMultExprTrait< SVecScalarMultExpr<VT1,ST1,false>, SVecScalarMultExpr<VT2,ST2,false> >
1823 template<
typename VT1,
typename ST,
typename VT2 >
1841 template<
typename VT1,
typename VT2,
typename ST >
1859 template<
typename VT1,
typename ST1,
typename VT2,
typename ST2 >
1885 template<
typename VT1,
typename ST,
typename VT2 >
1903 template<
typename VT1,
typename VT2,
typename ST >
1921 template<
typename VT1,
typename ST1,
typename VT2,
typename ST2 >
1947 template<
typename MT,
typename VT,
typename ST >
1973 template<
typename MT,
typename VT,
typename ST >
1999 template<
typename VT,
typename ST,
typename MT >
2025 template<
typename VT,
typename ST,
typename MT >
2051 template<
typename MT,
typename VT,
typename ST >
2077 template<
typename MT,
typename VT,
typename ST >
2103 template<
typename VT,
typename ST,
typename MT >
2129 template<
typename VT,
typename ST,
typename MT >
2155 template<
typename VT,
typename ST,
bool TF,
bool AF >
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: SVecScalarMultExpr.h:450
ValueType & ReferenceType
Reference return type.
Definition: SVecScalarMultExpr.h:208
Pointer difference type of the Blaze library.
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecScalarMultExpr.h:394
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:80
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecScalarMultExpr.h:285
Header file for auxiliary alias declarations.
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
Constraint on the data type.
Evaluation of the expression type of a sparse vector/dense vector multiplication.Via this type trait ...
Definition: SVecDVecMultExprTrait.h:78
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: SVecScalarMultExpr.h:184
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:70
Evaluation of the expression type type of a subvector operation.Via this type trait it is possible to...
Definition: SubvectorExprTrait.h:79
IteratorCategory iterator_category
The iterator category.
Definition: SVecScalarMultExpr.h:212
Header file for basic type definitions.
Header file for the SparseVector base class.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecScalarMultExpr.h:296
typename DVecScalarMultExprTrait< VT, ST >::Type DVecScalarMultExprTrait_
Auxiliary alias declaration for the DVecScalarMultExprTrait class template.The DVecScalarMultExprTrai...
Definition: DVecScalarMultExprTrait.h:164
typename SVecScalarDivExprTrait< VT, ST >::Type SVecScalarDivExprTrait_
Auxiliary alias declaration for the SVecScalarDivExprTrait class template.The SVecScalarDivExprTrait_...
Definition: SVecScalarDivExprTrait.h:172
Evaluation of the expression type of a sparse vector/scalar multiplication.Via this type trait it is ...
Definition: SVecScalarMultExprTrait.h:126
Evaluation of the expression type of a transpose dense vector/transpose sparse vector multiplication...
Definition: TDVecTSVecMultExprTrait.h:78
Evaluation of the expression type of a sparse vector/transpose dense vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse vector/transpose dense vector multiplication (outer product). Given the non-transpose sparse vector type VT1 and the transpose dense vector type VT2, the nested type Type corresponds to the resulting expression type. In case either VT1 is not a non-transpose sparse vector type or VT2 is not a transpose dense vector type, the resulting Type is set to INVALID_TYPE.
Definition: SVecDVecOuterExprTrait.h:79
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 IsSparseMatrix type trait.
Header file for the serial shim.
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecScalarMultExpr.h:307
ConstIterator begin() const
Returns an iterator to the first non-zero element of the sparse vector.
Definition: SVecScalarMultExpr.h:364
Header file for the IsColumnMajorMatrix type trait.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecScalarMultExpr.h:209
Header file for the IsRowVector type trait.
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
Header file for the And class template.
Iterator over the elements of the sparse vector/scalar multiplication expression. ...
Definition: SVecScalarMultExpr.h:195
ConstIterator_< RemoveReference_< LeftOperand > > IteratorType
Iterator type of the sparse vector expression.
Definition: SVecScalarMultExpr.h:203
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:721
Evaluation of the expression type of a sparse vector/transpose dense matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse vector/transpose dense matrix multiplication. Given the transpose sparse vector type VT and the column-major dense matrix type MT, the nested type Type corresponds to the resulting expression type. In case either VT is not a transpose sparse vector type or MT is not a column-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSVecTDMatMultExprTrait.h:81
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Header file for the Computation base class.
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:731
Evaluation of the expression type of a sparse vector/scalar division.Via this type trait it is possib...
Definition: SVecScalarDivExprTrait.h:134
Header file for the RequiresEvaluation type trait.
Header file for the VecScalarMultExpr base class.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
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
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_
Auxiliary alias declaration for the UnderlyingBuiltin type trait.The UnderlyingBuiltin_ alias declara...
Definition: UnderlyingBuiltin.h:133
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecScalarMultExpr.h:233
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
Constraint on the data type.
auto length(const DenseVector< VT, TF > &dv) -> decltype(sqrt(sqrLength(~dv)))
Calculation of the dense vector length .
Definition: DenseVector.h:574
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
const Element operator*() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecScalarMultExpr.h:244
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: SVecScalarMultExpr.h:482
Header file for the DivExprTrait class template.
typename MultExprTrait< T1, T2 >::Type MultExprTrait_
Auxiliary alias declaration for the MultExprTrait class template.The MultExprTrait_ alias declaration...
Definition: MultExprTrait.h:344
Header file for the MultExprTrait class template.
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
ValueIndexPair< ElementType > Element
Element type of the sparse vector expression.
Definition: SVecScalarMultExpr.h:200
const EnableIf_< IsNumeric< T2 >, DivExprTrait_< T1, T2 > > operator/(const DenseMatrix< T1, SO > &mat, T2 scalar)
Division operator for the division of a dense matrix by a scalar value ( ).
Definition: DMatScalarDivExpr.h:966
Header file for the ValueIndexPair class.
Header file for the IsTemporary type trait class.
Compile time check for dense vector types.This type trait tests whether or not the given template par...
Definition: IsDenseVector.h:78
Header file for the multiplication trait.
PointerType pointer
Pointer return type.
Definition: SVecScalarMultExpr.h:214
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: SVecScalarMultExpr.h:315
Header file for the UnderlyingBuiltin type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SVecScalarMultExpr.h:175
Header file for the Or class template.
#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
If_< IsExpression< VT >, const VT, const VT &> LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecScalarMultExpr.h:181
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SVecScalarMultExpr.h:474
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Evaluation of the expression type of a dense matrix/sparse vector multiplication.Via this type trait ...
Definition: DMatSVecMultExprTrait.h:80
Evaluation of the expression type of a transpose sparse vector/scalar multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse vector/scalar multiplication. Given the transpose sparse vector type VT and the scalar type ST, the nested type Type corresponds to the resulting expression type. In case either VT is not a transpose sparse vector type or ST is not a scalar type, the resulting Type is set to INVALID_TYPE.
Definition: TSVecScalarMultExprTrait.h:126
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Compile time check for sparse vector types.This type trait tests whether or not the given template pa...
Definition: IsSparseVector.h:78
#define BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE(A, B)
Data type constraint.In case the two types A and B are not the same (ignoring all cv-qualifiers of bo...
Definition: SameType.h:71
#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
typename TSVecScalarDivExprTrait< VT, ST >::Type TSVecScalarDivExprTrait_
Auxiliary alias declaration for the TSVecScalarDivExprTrait class template.The TSVecScalarDivExprTrai...
Definition: TSVecScalarDivExprTrait.h:171
CompositeType_< VT > CT
Composite type of the sparse vector expression.
Definition: SVecScalarMultExpr.h:117
Constraint on the data type.
Evaluation of the expression type of a sparse matrix/sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/sparse vector multiplication. Given the row-major sparse matrix type MT and the non-transpose sparse vector type VT, the nested type Type corresponds to the resulting expression type. In case either MT is not a row-major sparse matrix type or VT is not a non-transpose sparse vector type, the resulting data type Type is set to INVALID_TYPE.
Definition: SMatSVecMultExprTrait.h:80
#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
Evaluation of the expression type of a sparse vector/sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse vector/sparse matrix multiplication. Given the transpose sparse vector type VT and the row-major sparse matrix type MT, the nested type Type corresponds to the resulting expression type. In case either VT is not a transpose sparse vector type or MT is not a row-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSVecSMatMultExprTrait.h:78
Compile time check for column vector types.This type trait tests whether or not the given template ar...
Definition: IsColumnVector.h:80
Evaluation of the expression type of a transpose sparse vector/transpose sparse vector multiplication...
Definition: TSVecTSVecMultExprTrait.h:77
Header file for the exception macros of the math module.
Compile time check for dense matrix types.This type trait tests whether or not the given template par...
Definition: IsDenseMatrix.h:78
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecScalarMultExpr.h:338
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Header file for the IsDenseMatrix type trait.
const ConstIterator * operator->() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecScalarMultExpr.h:254
Header file for the EnableIf class template.
typename DivTrait< T1, T2 >::Type DivTrait_
Auxiliary alias declaration for the DivTrait class template.The DivTrait_ alias declaration provides ...
Definition: DivTrait.h:245
Evaluation of the expression type of a transpose sparse matrix/sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/sparse vector multiplication. Given the column-major sparse matrix type MT and the non-transpose sparse vector type VT, the nested type Type corresponds to the resulting expression type. In case either MT is not a column-major sparse matrix type or VT is not a non-transpose sparse vector type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSMatSVecMultExprTrait.h:79
Header file for the IsNumeric type trait.
IfTrue_< useAssign, const ResultType, const SVecScalarMultExpr &> CompositeType
Data type for composite expression templates.
Definition: SVecScalarMultExpr.h:178
typename SMatScalarMultExprTrait< MT, ST >::Type SMatScalarMultExprTrait_
Auxiliary alias declaration for the SMatScalarMultExprTrait class template.The SMatScalarMultExprTrai...
Definition: SMatScalarMultExprTrait.h:164
Evaluation of the expression type of a transpose dense matrix/sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/sparse vector multiplication. Given the column-major dense matrix type MT and the non-transpose sparse vector type VT, the nested type Type corresponds to the resulting expression type. In case either MT is not a column-major dense matrix type or VT is not a non-transpose sparse vector type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDMatSVecMultExprTrait.h:79
typename SVecScalarMultExprTrait< VT, ST >::Type SVecScalarMultExprTrait_
Auxiliary alias declaration for the SVecScalarMultExprTrait class template.The SVecScalarMultExprTrai...
Definition: SVecScalarMultExprTrait.h:164
Header file for the IsSparseVector type trait.
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SVecScalarMultExpr.h:172
ResultType_< VT > RT
Result type of the sparse vector expression.
Definition: SVecScalarMultExpr.h:115
Header file for run time assertion macros.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:83
Utility type for generic codes.
Element ValueType
Type of the underlying pointers.
Definition: SVecScalarMultExpr.h:206
Header file for the division trait.
IteratorType vector_
Iterator over the elements of the left-hand side sparse vector expression.
Definition: SVecScalarMultExpr.h:314
ConstIterator lowerBound(size_t index) const
Returns an iterator to the first index not less then the given index.
Definition: SVecScalarMultExpr.h:417
ConstIterator end() const
Returns an iterator just past the last non-zero element of the sparse vector.
Definition: SVecScalarMultExpr.h:374
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SVecScalarMultExpr.h:462
ReferenceType reference
Reference return type.
Definition: SVecScalarMultExpr.h:215
SVecScalarMultExpr< VT, ST, TF > This
Type of this SVecScalarMultExpr instance.
Definition: SVecScalarMultExpr.h:169
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
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecScalarMultExpr.h:205
Evaluation of the expression type of a sparse vector/transpose sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse vector/transpose sparse vector multiplication (outer product). Given the non-transpose sparse vector type VT1 and the transpose sparse vector type VT2, the nested type Type corresponds to the resulting expression type. In case either VT1 is not a non-transpose sparse vector type or VT2 is not a transpose sparse vector type, the resulting Type is set to INVALID_TYPE.
Definition: SVecSVecOuterExprTrait.h:78
MultTrait_< RT, ST > ResultType
Result type for expression template evaluations.
Definition: SVecScalarMultExpr.h:170
Constraint on the data type.
size_t size() const noexcept
Returns the current size/dimension of the vector.
Definition: SVecScalarMultExpr.h:384
#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
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:93
typename TSVecScalarMultExprTrait< VT, ST >::Type TSVecScalarMultExprTrait_
Auxiliary alias declaration for the TSVecScalarMultExprTrait class template.The TSVecScalarMultExprTr...
Definition: TSVecScalarMultExprTrait.h:164
Compile time check for data types.This type trait tests whether or not the given template parameter i...
Definition: IsInvertible.h:83
typename TSMatScalarMultExprTrait< MT, ST >::Type TSMatScalarMultExprTrait_
Auxiliary alias declaration for the TSMatScalarMultExprTrait class template.The TSMatScalarMultExprTr...
Definition: TSMatScalarMultExprTrait.h:164
ValueType * PointerType
Pointer return type.
Definition: SVecScalarMultExpr.h:207
Evaluation of the expression type of a transpose sparse vector/scalar division.Via this type trait it...
Definition: TSVecScalarDivExprTrait.h:133
DifferenceType difference_type
Difference between two iterators.
Definition: SVecScalarMultExpr.h:216
#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
Header file for the RemoveReference type trait.
Header file for the IsInvertible type trait.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
Header file for the IsDenseVector type trait.
ConstIterator find(size_t index) const
Searches for a specific vector element.
Definition: SVecScalarMultExpr.h:405
ValueType value_type
Type of the underlying pointers.
Definition: SVecScalarMultExpr.h:213
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
Evaluation of the expression type of a sparse vector/dense matrix multiplication.Via this type trait ...
Definition: TSVecDMatMultExprTrait.h:78
ReturnType_< VT > RN
Return type of the sparse vector expression.
Definition: SVecScalarMultExpr.h:116
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
const DVecScalarMultExpr< VT, ElementType_< VT >, TF > normalize(const DenseVector< VT, TF > &vec)
Normalization of the dense vector ( ).
Definition: DVecScalarMultExpr.h:1164
Header file for the IsRowMajorMatrix type trait.
Evaluation of the expression type of a dense vector/sparse vector multiplication.Via this type trait ...
Definition: DVecSVecMultExprTrait.h:77
MultExprTrait_< RN, ST > ExprReturnType
Expression return type for the subscript operator.
Definition: SVecScalarMultExpr.h:130
Header file for the IsComputation type trait class.
typename DivExprTrait< T1, T2 >::Type DivExprTrait_
Auxiliary alias declaration for the DivExprTrait class template.The DivExprTrait_ alias declaration p...
Definition: DivExprTrait.h:196
Expression object for sparse vector-scalar multiplications.The SVecScalarMultExpr class represents th...
Definition: Forward.h:129
Compile time logical or evaluation.The Or class template performs at compile time a logical or ('&&')...
Definition: Or.h:101
Evaluation of the expression type of a transpose sparse vector/transpose dense vector multiplication...
Definition: TSVecTDVecMultExprTrait.h:78
Compile time evaluation of the size of a vector.The Size type trait evaluates the size of the given v...
Definition: Size.h:75
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SVecScalarMultExpr.h:171
size_t index() const
Access to the current index of the sparse element.
Definition: SVecScalarMultExpr.h:274
Evaluation of the expression type of a sparse vector/sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse vector/sparse vector multiplication. Given the two non-transpose sparse vector types VT1 and VT2, the nested type Type corresponds to the resulting expression type. In case either VT1 or VT2 is not a non-transpose sparse vector type, the resulting Type is set to INVALID_TYPE.
Definition: SVecSVecMultExprTrait.h:76
SVecScalarMultExpr(const VT &vector, ST scalar) noexcept
Constructor for the SVecScalarMultExpr class.
Definition: SVecScalarMultExpr.h:326
ConstIterator upperBound(size_t index) const
Returns an iterator to the first index greater then the given index.
Definition: SVecScalarMultExpr.h:429
Header file for the SubvectorExprTrait class template.
Compile time check for sparse matrix types.This type trait tests whether or not the given template pa...
Definition: IsSparseMatrix.h:78
typename TDVecScalarMultExprTrait< VT, ST >::Type TDVecScalarMultExprTrait_
Auxiliary alias declaration for the TDVecScalarMultExprTrait class template.The TDVecScalarMultExprTr...
Definition: TDVecScalarMultExprTrait.h:164
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
LeftOperand vector_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecScalarMultExpr.h:481
Header file for the IsColumnVector type trait.
Evaluation of the expression type of a dense vector/transpose sparse vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a dense vector/transpose sparse vector multiplication (outer product). Given the non-transpose dense vector type VT1 and the transpose sparse vector type VT2, the nested type Type corresponds to the resulting expression type. In case either VT1 is not a non-transpose dense vector type or VT2 is not a transpose sparse vector type, the resulting Type is set to INVALID_TYPE.
Definition: DVecSVecOuterExprTrait.h:79
ReturnType at(size_t index) const
Checked access to the vector elements.
Definition: SVecScalarMultExpr.h:351
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecScalarMultExpr.h:264
const DMatDMatMultExpr< T1, T2, false, false, false, false > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7505
Header file for the Size type trait.
Evaluation of the expression type of a sparse vector/transpose sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse vector/transpose sparse matrix multiplication. Given the transpose sparse vector type VT and the column-major sparse matrix type MT, the nested type Type corresponds to the resulting expression type. In case either VT is not a transpose sparse vector type or MT is not a column-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSVecTSMatMultExprTrait.h:81
#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
#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
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecScalarMultExpr.h:440
#define BLAZE_CONSTRAINT_MUST_BE_FLOATING_POINT_TYPE(T)
Constraint on the data type.In case the given data type T is not a floating point data type...
Definition: FloatingPoint.h:61
Header file for the IsExpression type trait class.
Header file for the function trace functionality.
ConstIterator(IteratorType vector, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: SVecScalarMultExpr.h:222