Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
blaze::TSMatSVecMultExpr< MT, VT > Class Template Reference

Expression object for sparse matrix-sparse vector multiplications.The TSMatSVecMultExpr class represents the compile time expression for multiplications between column-major sparse matrices and sparse vectors. More...

#include <TSMatSVecMultExpr.h>

Inherits blaze::SparseVector< TSMatSVecMultExpr< MT, VT >, false >, blaze::MatVecMultExpr, and blaze::Computation.

Public Types

enum  { smpAssignable }
 Compilation switch for the expression template assignment strategy.
 
typedef TSMatSVecMultExpr< MT, VT > This
 Type of this TSMatSVecMultExpr instance.
 
typedef MultTrait< MRT, VRT >::Type ResultType
 Result type for expression template evaluations.
 
typedef ResultType::TransposeType TransposeType
 Transpose type for expression template evaluations.
 
typedef ResultType::ElementType ElementType
 Resulting element type.
 
typedef const ElementType ReturnType
 Return type for expression template evaluations.
 
typedef const ResultType CompositeType
 Data type for composite expression templates.
 
typedef SelectType< IsExpression< MT >::value, const MT, const MT & >::Type LeftOperand
 Composite type of the left-hand side sparse matrix expression.
 
typedef SelectType< IsExpression< VT >::value, const VT, const VT & >::Type RightOperand
 Composite type of the right-hand side sparse vector expression.
 
typedef SelectType< evaluateMatrix, const MRT, MCT >::Type LT
 Type for the assignment of the left-hand side sparse matrix operand.
 
typedef SelectType< evaluateVector, const VRT, VCT >::Type RT
 Type for the assignment of the right-hand side sparse vector operand.
 
typedef TSMatSVecMultExpr< MT, VT > VectorType
 Type of the vector.
 

Public Member Functions

 TSMatSVecMultExpr (const MT &mat, const VT &vec)
 Constructor for the TSMatSVecMultExpr class. More...
 
ReturnType operator[] (size_t index) const
 Subscript operator for the direct access to the vector elements. More...
 
ReturnType at (size_t index) const
 Checked access to the vector elements. More...
 
size_t size () const
 Returns the current size/dimension of the vector. More...
 
size_t nonZeros () const
 Returns an estimation for the number of non-zero elements in the sparse vector. More...
 
LeftOperand leftOperand () const
 Returns the left-hand side transpose sparse matrix operand. More...
 
RightOperand rightOperand () const
 Returns the right-hand side sparse vector operand. More...
 
template<typename T >
bool canAlias (const T *alias) const
 Returns whether the expression can alias with the given address alias. More...
 
template<typename T >
bool isAliased (const T *alias) const
 Returns whether the expression is aliased with the given address alias. More...
 
bool canSMPAssign () const
 Returns whether the expression can be used in SMP assignments. More...
 
BLAZE_ALWAYS_INLINE VectorTypeoperator~ ()
 Conversion operator for non-constant vectors. More...
 
BLAZE_ALWAYS_INLINE const VectorTypeoperator~ () const
 Conversion operator for constant vectors. More...
 

Private Types

enum  { evaluateMatrix = RequiresEvaluation<MT>::value }
 Compilation switch for the composite type of the left-hand side sparse matrix expression.
 
enum  { evaluateVector = RequiresEvaluation<VT>::value || IsComputation<VT>::value }
 Compilation switch for the composite type of the right-hand side sparse vector expression.
 
typedef MT::ResultType MRT
 Result type of the left-hand side sparse matrix expression.
 
typedef VT::ResultType VRT
 Result type of the right-hand side sparse vector expression.
 
typedef MT::CompositeType MCT
 Composite type of the left-hand side sparse matrix expression.
 
typedef VT::CompositeType VCT
 Composite type of the right-hand side sparse vector expression.
 

Private Attributes

LeftOperand mat_
 Left-hand side sparse matrix of the multiplication expression.
 
RightOperand vec_
 Right-hand side sparse vector of the multiplication expression.
 

Detailed Description

template<typename MT, typename VT>
class blaze::TSMatSVecMultExpr< MT, VT >

Expression object for sparse matrix-sparse vector multiplications.

The TSMatSVecMultExpr class represents the compile time expression for multiplications between column-major sparse matrices and sparse vectors.

Constructor & Destructor Documentation

template<typename MT , typename VT >
blaze::TSMatSVecMultExpr< MT, VT >::TSMatSVecMultExpr ( const MT &  mat,
const VT &  vec 
)
inlineexplicit

Constructor for the TSMatSVecMultExpr class.

Parameters
matThe left-hand side sparse matrix operand of the multiplication expression.
vecThe right-hand side sparse vector operand of the multiplication expression.

Member Function Documentation

template<typename MT , typename VT >
ReturnType blaze::TSMatSVecMultExpr< MT, VT >::at ( size_t  index) const
inline

Checked access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
The resulting value.
Exceptions
std::out_of_rangeInvalid vector access index.
template<typename MT , typename VT >
template<typename T >
bool blaze::TSMatSVecMultExpr< MT, VT >::canAlias ( const T *  alias) const
inline

Returns whether the expression can alias with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case the expression can alias, false otherwise.
template<typename MT , typename VT >
bool blaze::TSMatSVecMultExpr< MT, VT >::canSMPAssign ( ) const
inline

Returns whether the expression can be used in SMP assignments.

Returns
true in case the expression can be used in SMP assignments, false if not.
template<typename MT , typename VT >
template<typename T >
bool blaze::TSMatSVecMultExpr< MT, VT >::isAliased ( const T *  alias) const
inline

Returns whether the expression is aliased with the given address alias.

Parameters
aliasThe alias to be checked.
Returns
true in case an alias effect is detected, false otherwise.
template<typename MT , typename VT >
LeftOperand blaze::TSMatSVecMultExpr< MT, VT >::leftOperand ( ) const
inline

Returns the left-hand side transpose sparse matrix operand.

Returns
The left-hand side transpose sparse matrix operand.
template<typename MT , typename VT >
size_t blaze::TSMatSVecMultExpr< MT, VT >::nonZeros ( ) const
inline

Returns an estimation for the number of non-zero elements in the sparse vector.

Returns
The estimate for the number of non-zero elements in the sparse vector.
template<typename MT , typename VT >
ReturnType blaze::TSMatSVecMultExpr< MT, VT >::operator[] ( size_t  index) const
inline

Subscript operator for the direct access to the vector elements.

Parameters
indexAccess index. The index has to be in the range $[0..N-1]$.
Returns
The resulting value.
BLAZE_ALWAYS_INLINE VectorType& blaze::Vector< TSMatSVecMultExpr< MT, VT > , TF >::operator~ ( )
inlineinherited

Conversion operator for non-constant vectors.

Returns
Reference of the actual type of the vector.
BLAZE_ALWAYS_INLINE const VectorType& blaze::Vector< TSMatSVecMultExpr< MT, VT > , TF >::operator~ ( ) const
inlineinherited

Conversion operator for constant vectors.

Returns
Const reference of the actual type of the vector.
template<typename MT , typename VT >
RightOperand blaze::TSMatSVecMultExpr< MT, VT >::rightOperand ( ) const
inline

Returns the right-hand side sparse vector operand.

Returns
The right-hand side sparse vector operand.
template<typename MT , typename VT >
size_t blaze::TSMatSVecMultExpr< MT, VT >::size ( ) const
inline

Returns the current size/dimension of the vector.

Returns
The size of the vector.

The documentation for this class was generated from the following files: