22 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECSVECMULTEXPR_H_
23 #define _BLAZE_MATH_EXPRESSIONS_DVECSVECMULTEXPR_H_
69 template<
typename VT1
78 typedef typename VT1::ResultType
RT1;
79 typedef typename VT2::ResultType
RT2;
80 typedef typename VT1::ReturnType
RN1;
81 typedef typename VT2::ReturnType
RN2;
82 typedef typename VT1::CompositeType
CT1;
83 typedef typename VT2::CompositeType
CT2;
84 typedef typename VT1::TransposeType
TT1;
85 typedef typename VT2::TransposeType
TT2;
113 template<
typename VT >
115 enum { value = useAssign };
330 return rhs_.nonZeros();
360 template<
typename T >
362 return (
lhs_.canAlias( alias ) ||
rhs_.canAlias( alias ) );
372 template<
typename T >
374 return (
lhs_.isAliased( alias ) ||
rhs_.isAliased( alias ) );
398 template<
typename VT >
415 for( ConstIterator element=y.begin(); element!=y.end(); ++element )
416 (~lhs)[element->index()] = x[element->index()] * element->value();
435 template<
typename VT >
452 for( ConstIterator element=y.begin(); element!=y.end(); ++element )
453 (~lhs).append( element->index(), x[element->index()] * element->value() );
472 template<
typename VT >
473 friend inline typename EnableIf< UseAssign<VT> >::Type
480 typedef typename RemoveReference<CT2>::Type::ConstIterator ConstIterator;
489 for( ConstIterator element=y.begin(); element!=y.end(); ++element )
490 (~lhs)[element->index()] += x[element->index()] * element->value();
513 template<
typename VT >
514 friend inline typename EnableIf< UseAssign<VT> >::Type
521 typedef typename RemoveReference<CT2>::Type::ConstIterator ConstIterator;
530 for( ConstIterator element=y.begin(); element!=y.end(); ++element )
531 (~lhs)[element->index()] -= x[element->index()] * element->value();
554 template<
typename VT >
555 friend inline typename EnableIf< UseAssign<VT> >::Type
562 typedef typename RemoveReference<CT2>::Type::ConstIterator ConstIterator;
571 const ConstIterator
end( y.end() );
572 ConstIterator
begin( y.begin() );
577 for( ; i<index; ++i )
583 for( ; i<(~lhs).
size(); ++i )
640 template<
typename T1
643 inline const DVecSVecMultExpr<T1,T2,TF>
648 if( (~lhs).
size() != (~rhs).
size() )
649 throw std::invalid_argument(
"Vector sizes do not match" );