Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Math::VectorMatrixUnary< E, F > Class Template Reference

Expression-template node interpreting a vector expression E as a column matrix via the per-element functor F. More...

#include <MatrixExpression.hpp>

+ Inheritance diagram for CDPL::Math::VectorMatrixUnary< E, F >:

Public Types

typedef F::ResultType ValueType
 The element value type of the expression (the functor's result type). More...
 
typedef const ValueType ConstReference
 Constant reference type to an element value. More...
 
typedef const ValueType Reference
 Mutable reference type (degrades to const for expression-template results). More...
 
typedef const SelfType ConstClosureType
 Constant closure type used when this expression appears inside another expression. More...
 
typedef SelfType ClosureType
 Closure type used when this expression appears inside another expression. More...
 
typedef E::SizeType SizeType
 The size type inherited from the wrapped vector expression. More...
 
typedef E::DifferenceType DifferenceType
 The signed difference type inherited from the wrapped vector expression. More...
 
- Public Types inherited from CDPL::Math::MatrixExpression< VectorMatrixUnary< E, F > >
typedef VectorMatrixUnary< E, F > ExpressionType
 The derived matrix expression type. More...
 
- Public Types inherited from CDPL::Math::Expression< E >
typedef E ExpressionType
 The derived expression type (made available to expression-template machinery). More...
 

Public Member Functions

 VectorMatrixUnary (const ExpressionType &e)
 Constructs the expression-template node wrapping the vector expression e. More...
 
SizeType getSize1 () const
 Returns the wrapped vector expression's size (used as the number of rows of the resulting matrix view). More...
 
SizeType getSize2 () const
 Returns the wrapped vector expression's size (used as the number of columns of the resulting matrix view). More...
 
ConstReference operator() (SizeType i, SizeType j) const
 Applies the functor to the wrapped vector expression and the index pair (i, j) to produce the matrix element. More...
 
- Public Member Functions inherited from CDPL::Math::MatrixExpression< VectorMatrixUnary< E, F > >
const ExpressionTypeoperator() () const
 Returns a const reference to the derived matrix expression. More...
 
ExpressionTypeoperator() ()
 Returns a reference to the derived matrix expression. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Math::MatrixExpression< VectorMatrixUnary< E, F > >
 MatrixExpression ()
 
 ~MatrixExpression ()
 
- Protected Member Functions inherited from CDPL::Math::Expression< E >
 Expression ()
 
 ~Expression ()
 

Detailed Description

template<typename E, typename F>
class CDPL::Math::VectorMatrixUnary< E, F >

Expression-template node interpreting a vector expression E as a column matrix via the per-element functor F.

Template Parameters
EThe wrapped vector expression type.
FThe unary functor type producing matrix elements from vector elements.

Member Typedef Documentation

◆ ValueType

template<typename E , typename F >
typedef F::ResultType CDPL::Math::VectorMatrixUnary< E, F >::ValueType

The element value type of the expression (the functor's result type).

◆ ConstReference

template<typename E , typename F >
typedef const ValueType CDPL::Math::VectorMatrixUnary< E, F >::ConstReference

Constant reference type to an element value.

◆ Reference

template<typename E , typename F >
typedef const ValueType CDPL::Math::VectorMatrixUnary< E, F >::Reference

Mutable reference type (degrades to const for expression-template results).

◆ ConstClosureType

template<typename E , typename F >
typedef const SelfType CDPL::Math::VectorMatrixUnary< E, F >::ConstClosureType

Constant closure type used when this expression appears inside another expression.

◆ ClosureType

template<typename E , typename F >
typedef SelfType CDPL::Math::VectorMatrixUnary< E, F >::ClosureType

Closure type used when this expression appears inside another expression.

◆ SizeType

template<typename E , typename F >
typedef E::SizeType CDPL::Math::VectorMatrixUnary< E, F >::SizeType

The size type inherited from the wrapped vector expression.

◆ DifferenceType

template<typename E , typename F >
typedef E::DifferenceType CDPL::Math::VectorMatrixUnary< E, F >::DifferenceType

The signed difference type inherited from the wrapped vector expression.

Constructor & Destructor Documentation

◆ VectorMatrixUnary()

template<typename E , typename F >
CDPL::Math::VectorMatrixUnary< E, F >::VectorMatrixUnary ( const ExpressionType e)
inline

Constructs the expression-template node wrapping the vector expression e.

Parameters
eThe vector expression to wrap.

Member Function Documentation

◆ getSize1()

template<typename E , typename F >
SizeType CDPL::Math::VectorMatrixUnary< E, F >::getSize1 ( ) const
inline

Returns the wrapped vector expression's size (used as the number of rows of the resulting matrix view).

Returns
The number of rows.

◆ getSize2()

template<typename E , typename F >
SizeType CDPL::Math::VectorMatrixUnary< E, F >::getSize2 ( ) const
inline

Returns the wrapped vector expression's size (used as the number of columns of the resulting matrix view).

Returns
The number of columns.

◆ operator()()

template<typename E , typename F >
ConstReference CDPL::Math::VectorMatrixUnary< E, F >::operator() ( SizeType  i,
SizeType  j 
) const
inline

Applies the functor to the wrapped vector expression and the index pair (i, j) to produce the matrix element.

Parameters
iThe zero-based row index.
jThe zero-based column index.
Returns
The computed matrix element.

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