35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATSCALARMULTEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_SMATSCALARMULTEXPR_H_ 115 template<
typename MT
118 class SMatScalarMultExpr :
public SparseMatrix< SMatScalarMultExpr<MT,ST,SO>, SO >
119 ,
private MatScalarMultExpr
120 ,
private Computation
153 template<
typename MT2 >
156 enum :
bool { value = useAssign };
169 template<
typename MT2 >
170 struct UseSMPAssign {
171 enum :
bool { value = ( !MT2::smpAssignable || !MT::smpAssignable ) && useAssign };
327 enum :
bool { smpAssignable =
false };
364 inline ReturnType
at(
size_t i,
size_t j )
const {
402 inline size_t rows() const noexcept {
503 template<
typename T >
504 inline bool canAlias(
const T* alias )
const noexcept {
505 return matrix_.canAlias( alias );
515 template<
typename T >
516 inline bool isAliased(
const T* alias )
const noexcept {
517 return matrix_.isAliased( alias );
541 template<
typename MT2
551 assign( ~lhs, rhs.matrix_ );
552 (~lhs) *= rhs.scalar_;
571 template<
typename MT2
581 assign( ~lhs, rhs.matrix_ );
582 (~lhs) *= rhs.scalar_;
601 template<
typename MT2
603 friend inline EnableIf_< UseAssign<MT2> >
614 const ResultType tmp(
serial( rhs ) );
615 addAssign( ~lhs, tmp );
638 template<
typename MT2
640 friend inline EnableIf_< UseAssign<MT2> >
651 const ResultType tmp(
serial( rhs ) );
652 subAssign( ~lhs, tmp );
691 template<
typename MT2
693 friend inline EnableIf_< UseSMPAssign<MT2> >
704 const ResultType tmp( rhs );
728 template<
typename MT2
730 friend inline EnableIf_< UseSMPAssign<MT2> >
741 const ResultType tmp( rhs );
796 template<
typename MT
798 inline const SMatScalarMultExpr<MT,UnderlyingBuiltin_<MT>,SO>
838 template<
typename T1
872 template<
typename T1
905 template<
typename VT
940 template<
typename MT
950 return mat.leftOperand() * ( mat.rightOperand() * scalar );
969 template<
typename ST1
979 return mat.leftOperand() * ( scalar * mat.rightOperand() );
998 template<
typename MT
1008 return mat.leftOperand() * ( mat.rightOperand() / scalar );
1028 template<
typename MT
1037 return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1057 template<
typename VT
1066 return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1088 template<
typename MT
1120 template<
typename VT
1150 template<
typename MT
1154 inline const MultExprTrait_< SMatScalarMultExpr<MT,ST,SO>, VT >
1159 return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
1179 template<
typename VT
1188 return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
1210 template<
typename MT
1242 template<
typename VT
1272 template<
typename MT1
1282 return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1302 template<
typename MT1
1312 return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1332 template<
typename MT1
1337 inline const MultExprTrait_< SMatScalarMultExpr<MT1,ST,SO1>, MT2 >
1342 return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1362 template<
typename MT1
1372 return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1392 template<
typename MT1
1403 return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1419 template<
typename MT,
typename ST,
bool SO >
1420 struct Rows< SMatScalarMultExpr<MT,ST,SO> > :
public Columns<MT>
1436 template<
typename MT,
typename ST,
bool SO >
1437 struct Columns< SMatScalarMultExpr<MT,ST,SO> > :
public Rows<MT>
1453 template<
typename MT,
typename ST,
bool SO >
1454 struct IsSymmetric< SMatScalarMultExpr<MT,ST,SO> >
1471 template<
typename MT,
typename ST,
bool SO >
1472 struct IsHermitian< SMatScalarMultExpr<MT,ST,SO> >
1489 template<
typename MT,
typename ST,
bool SO >
1490 struct IsLower< SMatScalarMultExpr<MT,ST,SO> >
1507 template<
typename MT,
typename ST,
bool SO >
1525 template<
typename MT,
typename ST,
bool SO >
1526 struct IsUpper< SMatScalarMultExpr<MT,ST,SO> >
1543 template<
typename MT,
typename ST,
bool SO >
1561 template<
typename MT,
typename ST1,
typename ST2 >
1586 template<
typename MT,
typename ST1,
typename ST2 >
1611 template<
typename MT,
typename ST1,
typename ST2 >
1643 template<
typename MT,
typename ST1,
typename ST2 >
1675 template<
typename MT,
typename ST,
typename VT >
1693 template<
typename MT,
typename ST1,
typename VT,
typename ST2 >
1719 template<
typename MT,
typename ST,
typename VT >
1737 template<
typename MT,
typename ST1,
typename VT,
typename ST2 >
1763 template<
typename VT,
typename MT,
typename ST >
1781 template<
typename VT,
typename ST1,
typename MT,
typename ST2 >
1807 template<
typename VT,
typename MT,
typename ST >
1825 template<
typename VT,
typename ST1,
typename MT,
typename ST2 >
1851 template<
typename MT,
typename ST,
typename VT >
1869 template<
typename MT,
typename ST1,
typename VT,
typename ST2 >
1895 template<
typename MT,
typename ST,
typename VT >
1913 template<
typename MT,
typename ST1,
typename VT,
typename ST2 >
1939 template<
typename VT,
typename MT,
typename ST >
1957 template<
typename VT,
typename ST1,
typename MT,
typename ST2 >
1983 template<
typename VT,
typename MT,
typename ST >
2001 template<
typename VT,
typename ST1,
typename MT,
typename ST2 >
2027 template<
typename MT1,
typename MT2,
typename ST >
2053 template<
typename MT1,
typename MT2,
typename ST >
2079 template<
typename MT1,
typename MT2,
typename ST >
2105 template<
typename MT1,
typename MT2,
typename ST >
2131 template<
typename MT1,
typename ST,
typename MT2 >
2157 template<
typename MT1,
typename ST,
typename MT2 >
2183 template<
typename MT1,
typename ST,
typename MT2 >
2209 template<
typename MT1,
typename ST,
typename MT2 >
2235 template<
typename MT1,
typename ST,
typename MT2 >
2253 template<
typename MT1,
typename MT2,
typename ST >
2271 template<
typename MT1,
typename ST1,
typename MT2,
typename ST2 >
2272 struct SMatSMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,false> >
2297 template<
typename MT1,
typename ST,
typename MT2 >
2315 template<
typename MT1,
typename MT2,
typename ST >
2333 template<
typename MT1,
typename ST1,
typename MT2,
typename ST2 >
2359 template<
typename MT1,
typename ST,
typename MT2 >
2377 template<
typename MT1,
typename MT2,
typename ST >
2395 template<
typename MT1,
typename ST1,
typename MT2,
typename ST2 >
2421 template<
typename MT1,
typename ST,
typename MT2 >
2439 template<
typename MT1,
typename MT2,
typename ST >
2457 template<
typename MT1,
typename ST1,
typename MT2,
typename ST2 >
2483 template<
typename MT,
typename ST,
bool SO,
bool AF >
2505 template<
typename MT,
typename ST,
bool SO >
2527 template<
typename MT,
typename ST,
bool SO >
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: SVecScalarMultExpr.h:450
Evaluation of the expression type of a transpose sparse matrix/scalar multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/scalar multiplication. Given the column-major sparse matrix type MT and the scalar type ST, the nested type Type corresponds to the resulting expression type. In case either MT is not a column-major sparse matrix type or ST is not a scalar type, the resulting Type is set to INVALID_TYPE.
Definition: TSMatScalarMultExprTrait.h:126
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: SMatScalarMultExpr.h:381
Evaluation of the expression type of a transpose sparse matrix/transpose sparse matrix multiplication...
Definition: TSMatTSMatMultExprTrait.h:77
Pointer difference type of the Blaze library.
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense vector operand.
Definition: DVecScalarMultExpr.h:542
Compile time check for row vector types.This type trait tests whether or not the given template argum...
Definition: IsRowVector.h:80
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.
ReturnType_< MT > RN
Return type of the sparse matrix expression.
Definition: SMatScalarMultExpr.h:125
Evaluation of the expression type of a transpose dense matrix/transpose sparse matrix multiplication...
Definition: TDMatTSMatMultExprTrait.h:79
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:70
typename DMatScalarMultExprTrait< MT, ST >::Type DMatScalarMultExprTrait_
Auxiliary alias declaration for the DMatScalarMultExprTrait class template.The DMatScalarMultExprTrai...
Definition: DMatScalarMultExprTrait.h:164
Header file for the Rows type trait.
MultExprTrait_< RN, ST > ExprReturnType
Expression return type for the subscript operator.
Definition: SMatScalarMultExpr.h:139
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: SMatScalarMultExpr.h:492
Header file for basic type definitions.
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: SMatScalarMultExpr.h:433
typename DVecScalarMultExprTrait< VT, ST >::Type DVecScalarMultExprTrait_
Auxiliary alias declaration for the DVecScalarMultExprTrait class template.The DVecScalarMultExprTrai...
Definition: DVecScalarMultExprTrait.h:164
ReturnType value() const
Access to the current value of the sparse element.
Definition: SMatScalarMultExpr.h:269
RightOperand rightOperand() const noexcept
Returns the right-hand side scalar operand.
Definition: DVecScalarMultExpr.h:552
PointerType pointer
Pointer return type.
Definition: SMatScalarMultExpr.h:219
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: SMatScalarMultExpr.h:524
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
ConstIterator_< RemoveReference_< LeftOperand > > IteratorType
Iterator type of the sparse matrix expression.
Definition: SMatScalarMultExpr.h:208
Header file for the IsSparseMatrix type trait.
Header file for the serial shim.
#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
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: SMatScalarMultExpr.h:320
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Evaluation of the expression type of a sparse matrix/scalar division.Via this type trait it is possib...
Definition: SMatScalarDivExprTrait.h:134
Header file for the ColumnExprTrait class template.
Evaluation of the expression type of a dense matrix/transpose sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a dense matrix/ transpose sparse matrix multiplication. Given the row-major dense matrix type MT1 and the column-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a row-major dense matrix type or MT2 is not a column-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: DMatTSMatMultExprTrait.h:78
ValueType & ReferenceType
Reference return type.
Definition: SMatScalarMultExpr.h:213
Header file for the IsColumnMajorMatrix type trait.
MultTrait_< RT, ST > ResultType
Result type for expression template evaluations.
Definition: SMatScalarMultExpr.h:179
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse matrix operand.
Definition: SMatScalarMultExpr.h:482
Header file for the IsRowVector type trait.
Header file for the And class template.
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Evaluation of the expression type of a sparse matrix/transpose dense matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/transpose dense matrix multiplication. Given the row-major sparse matrix type MT1 and the column-major dense matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a row-major sparse matrix type or MT2 is not a column-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: SMatTDMatMultExprTrait.h:79
TransposeType_< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: SMatScalarMultExpr.h:181
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
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.
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
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
Header file for the RequiresEvaluation type trait.
LeftOperand matrix_
Left-hand side sparse matrix of the multiplication expression.
Definition: SMatScalarMultExpr.h:523
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: SMatScalarMultExpr.h:364
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SMatScalarMultExpr.h:312
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
Evaluation of the expression type of a sparse matrix/dense vector multiplication.Via this type trait ...
Definition: SMatDVecMultExprTrait.h:78
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
Evaluation of the expression type of a transpose sparse matrix/transpose dense matrix multiplication...
Definition: TSMatTDMatMultExprTrait.h:79
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SMatScalarMultExpr.h:210
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_
Auxiliary alias declaration for the UnderlyingBuiltin type trait.The UnderlyingBuiltin_ alias declara...
Definition: UnderlyingBuiltin.h:133
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.
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
Header file for the SparseMatrix base class.
Header file for the DivExprTrait class template.
Constraint on the data type.
Evaluation of the expression type of a transpose dense matrix/sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose dense matrix/sparse matrix multiplication. Given the column-major dense matrix type MT1 and the row-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a column-major dense matrix type or MT2 is not a row-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDMatSMatMultExprTrait.h:79
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
ResultType_< MT > RT
Result type of the sparse matrix expression.
Definition: SMatScalarMultExpr.h:124
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: SMatScalarMultExpr.h:471
Evaluation of the expression type of a transpose sparse matrix/sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/sparse matrix multiplication. Given the column-major sparse matrix type MT1 and the row-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a column-major sparse matrix type or MT2 is not a row-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSMatSMatMultExprTrait.h:78
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.
SMatScalarMultExpr(const MT &matrix, ST scalar) noexcept
Constructor for the SMatScalarMultExpr class.
Definition: SMatScalarMultExpr.h:336
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.
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: SMatScalarMultExpr.h:205
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
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
ReferenceType reference
Reference return type.
Definition: SMatScalarMultExpr.h:220
Evaluation of the expression type of a dense vector/transpose sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a dense vector/transpose sparse matrix multiplication. Given the transpose dense 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 dense vector type or MT is not a column-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TDVecTSMatMultExprTrait.h:79
ConstIterator & operator++()
Pre-increment operator.
Definition: SMatScalarMultExpr.h:238
Header file for the UnderlyingBuiltin type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
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
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatScalarMultExpr.h:259
typename SMatScalarDivExprTrait< MT, ST >::Type SMatScalarDivExprTrait_
Auxiliary alias declaration for the SMatScalarDivExprTrait class template.The SMatScalarDivExprTrait_...
Definition: SMatScalarDivExprTrait.h:172
Header file for the Columns type trait.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: SMatScalarMultExpr.h:504
const IfTrue_< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: SMatScalarMultExpr.h:185
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 transpose sparse matrix/scalar division.Via this type trait it...
Definition: TSMatScalarDivExprTrait.h:133
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
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:80
IteratorCategory iterator_category
The iterator category.
Definition: SMatScalarMultExpr.h:217
#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
typename TDMatScalarMultExprTrait< MT, ST >::Type TDMatScalarMultExprTrait_
Auxiliary alias declaration for the TDMatScalarMultExprTrait class template.The TDMatScalarMultExprTr...
Definition: TDMatScalarMultExprTrait.h:164
Header file for the IsLower type trait.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: SMatScalarMultExpr.h:412
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: SMatScalarMultExpr.h:194
Evaluation of the expression type of a sparse matrix/sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/sparse matrix multiplication. Given the two row-major sparse matrix types MT1 and MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 or MT2 is not a row-major sparse matrix, the resulting data type Type is set to INVALID_TYPE.
Definition: SMatSMatMultExprTrait.h:76
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
Evaluation of the expression type of a dense vector/sparse matrix multiplication.Via this type trait ...
Definition: TDVecSMatMultExprTrait.h:80
ElementType_< ResultType > ElementType
Resulting element type.
Definition: SMatScalarMultExpr.h:182
#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 dense matrix/sparse matrix multiplication.Via this type trait ...
Definition: DMatSMatMultExprTrait.h:78
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.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
Evaluation of the expression type type of a row operation.Via this type trait it is possible to evalu...
Definition: RowExprTrait.h:79
Compile time check for dense matrix types.This type trait tests whether or not the given template par...
Definition: IsDenseMatrix.h:78
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: SMatScalarMultExpr.h:458
Constraint on the data type.
Header file for the RowExprTrait class template.
Expression object for sparse matrix-scalar multiplications.The SMatScalarMult class represents the co...
Definition: Forward.h:106
Header file for all forward declarations for expression class templates.
Header file for the IsDenseMatrix type trait.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: SMatScalarMultExpr.h:516
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: SMatScalarMultExpr.h:392
typename DivTrait< T1, T2 >::Type DivTrait_
Auxiliary alias declaration for the DivTrait class template.The DivTrait_ alias declaration provides ...
Definition: DivTrait.h:245
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SMatScalarMultExpr.h:214
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatScalarMultExpr.h:249
ValueType * PointerType
Pointer return type.
Definition: SMatScalarMultExpr.h:212
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.
typename SMatScalarMultExprTrait< MT, ST >::Type SMatScalarMultExprTrait_
Auxiliary alias declaration for the SMatScalarMultExprTrait class template.The SMatScalarMultExprTrai...
Definition: SMatScalarMultExprTrait.h:164
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.
Header file for the SubmatrixExprTrait class template.
Header file for the MatScalarMultExpr base class.
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.
ConstIterator(IteratorType matrix, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: SMatScalarMultExpr.h:227
Header file for the division trait.
Evaluation of the expression type of a sparse matrix/transpose sparse matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a sparse matrix/transpose sparse matrix multiplication. Given the row-major sparse matrix type MT1 and the column-major sparse matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a row-major sparse matrix type or MT2 is not a column-major sparse matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: SMatTSMatMultExprTrait.h:78
SMatScalarMultExpr< MT, ST, SO > This
Type of this SMatScalarMultExpr instance.
Definition: SMatScalarMultExpr.h:178
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
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SMatScalarMultExpr.h:301
#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
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SMatScalarMultExpr.h:422
typename TSVecScalarMultExprTrait< VT, ST >::Type TSVecScalarMultExprTrait_
Auxiliary alias declaration for the TSVecScalarMultExprTrait class template.The TSVecScalarMultExprTr...
Definition: TSVecScalarMultExprTrait.h:164
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
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
Evaluation of the expression type of a sparse matrix/scalar multiplication.Via this type trait it is ...
Definition: SMatScalarMultExprTrait.h:126
IfTrue_< useAssign, const ResultType, const SMatScalarMultExpr &> CompositeType
Data type for composite expression templates.
Definition: SMatScalarMultExpr.h:188
#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
Iterator over the elements of the sparse matrix/scalar multiplication expression. ...
Definition: SMatScalarMultExpr.h:200
DifferenceType difference_type
Difference between two iterators.
Definition: SMatScalarMultExpr.h:221
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
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
Element ValueType
Type of the underlying pointers.
Definition: SMatScalarMultExpr.h:211
Header file for the IsDenseVector type trait.
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
IteratorType matrix_
Iterator over the elements of the left-hand side sparse matrix expression.
Definition: SMatScalarMultExpr.h:319
If_< IsExpression< MT >, const MT, const MT &> LeftOperand
Composite data type of the sparse matrix expression.
Definition: SMatScalarMultExpr.h:191
CompositeType_< MT > CT
Composite type of the sparse matrix expression.
Definition: SMatScalarMultExpr.h:126
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
Header file for the IsRowMajorMatrix type trait.
OppositeType_< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatScalarMultExpr.h:180
Header file for the IsComputation type trait class.
Evaluation of the expression type of a transpose sparse matrix/dense vector multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/dense vector multiplication. Given the column-major sparse matrix type MT and the non-transpose dense 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 dense vector type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSMatDVecMultExprTrait.h:81
Expression object for dense vector-scalar multiplications.The DVecScalarMultExpr class represents the...
Definition: DVecScalarMultExpr.h:117
Evaluation of the expression type of a transpose sparse matrix/dense matrix multiplication.Via this type trait it is possible to evaluate the resulting expression type of a transpose sparse matrix/dense matrix multiplication. Given the column-major sparse matrix type MT1 and the row-major dense matrix type MT2, the nested type Type corresponds to the resulting expression type. In case either MT1 is not a column-major sparse matrix type or MT2 is not a row-major dense matrix type, the resulting data type Type is set to INVALID_TYPE.
Definition: TSMatDMatMultExprTrait.h:79
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
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
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:76
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: SMatScalarMultExpr.h:402
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 TSMatScalarDivExprTrait< MT, ST >::Type TSMatScalarDivExprTrait_
Auxiliary alias declaration for the TSMatScalarDivExprTrait class template.The TSMatScalarDivExprTrai...
Definition: TSMatScalarDivExprTrait.h:171
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
Header file for the IsUpper type trait.
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: SMatScalarMultExpr.h:445
Header file for the IsColumnVector type trait.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatScalarMultExpr.h:349
Header file for the IsHermitian type trait.
ValueType value_type
Type of the underlying pointers.
Definition: SMatScalarMultExpr.h:218
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
size_t index() const
Access to the current index of the sparse element.
Definition: SMatScalarMultExpr.h:279
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
Evaluation of the expression type type of a column operation.Via this type trait it is possible to ev...
Definition: ColumnExprTrait.h:78
#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
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SMatScalarMultExpr.h:290
LeftOperand leftOperand() const noexcept
Returns the left-hand side sparse vector operand.
Definition: SVecScalarMultExpr.h:440
#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
Evaluation of the expression type of a sparse matrix/dense matrix multiplication.Via this type trait ...
Definition: SMatDMatMultExprTrait.h:77
Header file for the IsExpression type trait class.
Header file for the function trace functionality.