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

Expression-template node interpreting a binary combination of two vector expressions as a matrix (e.g. outer product), via the per-cell functor F invoked with both expressions and the cell coordinates. More...

#include <MatrixExpression.hpp>

+ Inheritance diagram for CDPL::Math::VectorMatrixBinary< E1, E2, 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 CommonType< typename E1::SizeType, typename E2::SizeType >::Type SizeType
 The common size type of the two wrapped vector expressions. More...
 
typedef CommonType< typename E1::DifferenceType, typename E2::DifferenceType >::Type DifferenceType
 The common signed difference type of the two wrapped vector expressions. More...
 
- Public Types inherited from CDPL::Math::MatrixExpression< VectorMatrixBinary< E1, E2, F > >
typedef VectorMatrixBinary< E1, E2, 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

 VectorMatrixBinary (const Expression1Type &e1, const Expression2Type &e2)
 Constructs the expression-template node wrapping e1 and e2. More...
 
SizeType getSize1 () const
 Returns the first wrapped vector expression's size (number of rows of the resulting matrix view). More...
 
SizeType getSize2 () const
 Returns the second wrapped vector expression's size (number of columns of the resulting matrix view). More...
 
ConstReference operator() (SizeType i, SizeType j) const
 Applies the binary functor to e1(i) and e2(j) to produce the matrix element at (i, j). More...
 
- Public Member Functions inherited from CDPL::Math::MatrixExpression< VectorMatrixBinary< E1, E2, 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< VectorMatrixBinary< E1, E2, F > >
 MatrixExpression ()
 
 ~MatrixExpression ()
 
- Protected Member Functions inherited from CDPL::Math::Expression< E >
 Expression ()
 
 ~Expression ()
 

Detailed Description

template<typename E1, typename E2, typename F>
class CDPL::Math::VectorMatrixBinary< E1, E2, F >

Expression-template node interpreting a binary combination of two vector expressions as a matrix (e.g. outer product), via the per-cell functor F invoked with both expressions and the cell coordinates.

Template Parameters
E1The first vector expression type.
E2The second vector expression type.
FThe per-cell functor type.

Member Typedef Documentation

◆ ValueType

template<typename E1 , typename E2 , typename F >
typedef F::ResultType CDPL::Math::VectorMatrixBinary< E1, E2, F >::ValueType

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

◆ ConstReference

template<typename E1 , typename E2 , typename F >
typedef const ValueType CDPL::Math::VectorMatrixBinary< E1, E2, F >::ConstReference

Constant reference type to an element value.

◆ Reference

template<typename E1 , typename E2 , typename F >
typedef const ValueType CDPL::Math::VectorMatrixBinary< E1, E2, F >::Reference

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

◆ ConstClosureType

template<typename E1 , typename E2 , typename F >
typedef const SelfType CDPL::Math::VectorMatrixBinary< E1, E2, F >::ConstClosureType

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

◆ ClosureType

template<typename E1 , typename E2 , typename F >
typedef SelfType CDPL::Math::VectorMatrixBinary< E1, E2, F >::ClosureType

Closure type used when this expression appears inside another expression.

◆ SizeType

template<typename E1 , typename E2 , typename F >
typedef CommonType<typename E1::SizeType, typename E2::SizeType>::Type CDPL::Math::VectorMatrixBinary< E1, E2, F >::SizeType

The common size type of the two wrapped vector expressions.

◆ DifferenceType

template<typename E1 , typename E2 , typename F >
typedef CommonType<typename E1::DifferenceType, typename E2::DifferenceType>::Type CDPL::Math::VectorMatrixBinary< E1, E2, F >::DifferenceType

The common signed difference type of the two wrapped vector expressions.

Constructor & Destructor Documentation

◆ VectorMatrixBinary()

template<typename E1 , typename E2 , typename F >
CDPL::Math::VectorMatrixBinary< E1, E2, F >::VectorMatrixBinary ( const Expression1Type &  e1,
const Expression2Type &  e2 
)
inline

Constructs the expression-template node wrapping e1 and e2.

Parameters
e1The first vector expression (row source).
e2The second vector expression (column source).

Member Function Documentation

◆ getSize1()

template<typename E1 , typename E2 , typename F >
SizeType CDPL::Math::VectorMatrixBinary< E1, E2, F >::getSize1 ( ) const
inline

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

Returns
The number of rows.

◆ getSize2()

template<typename E1 , typename E2 , typename F >
SizeType CDPL::Math::VectorMatrixBinary< E1, E2, F >::getSize2 ( ) const
inline

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

Returns
The number of columns.

◆ operator()()

template<typename E1 , typename E2 , typename F >
ConstReference CDPL::Math::VectorMatrixBinary< E1, E2, F >::operator() ( SizeType  i,
SizeType  j 
) const
inline

Applies the binary functor to e1(i) and e2(j) to produce the matrix element at (i, j).

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: