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

Expression-template node combining a grid expression E1 (lhs) and a scalar E2 (rhs) element-wise via the binary functor F. More...

#include <GridExpression.hpp>

+ Inheritance diagram for CDPL::Math::Scalar2GridBinary< 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 E1::SizeType SizeType
 The size type inherited from the wrapped grid expression. More...
 
typedef E1::DifferenceType DifferenceType
 The signed difference type inherited from the wrapped grid expression. More...
 
- Public Types inherited from CDPL::Math::GridExpression< Scalar2GridBinary< E1, E2, F > >
typedef Scalar2GridBinary< E1, E2, F > ExpressionType
 The derived grid 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

 Scalar2GridBinary (const Expression1Type &e1, const Expression2Type &e2)
 Constructs the expression-template node combining the grid expression e1 and the scalar e2. More...
 
SizeType getSize1 () const
 Returns the size of the wrapped grid expression along the first dimension. More...
 
SizeType getSize2 () const
 Returns the size of the wrapped grid expression along the second dimension. More...
 
SizeType getSize3 () const
 Returns the size of the wrapped grid expression along the third dimension. More...
 
ConstReference operator() (SizeType i, SizeType j, SizeType k) const
 Applies the binary functor to the element at (i, j, k) of the wrapped grid expression and the scalar and returns the result. More...
 
- Public Member Functions inherited from CDPL::Math::GridExpression< Scalar2GridBinary< E1, E2, F > >
const ExpressionTypeoperator() () const
 Returns a const reference to the derived grid expression. More...
 
ExpressionTypeoperator() ()
 Returns a reference to the derived grid expression. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Math::GridExpression< Scalar2GridBinary< E1, E2, F > >
 GridExpression ()
 
 ~GridExpression ()
 
- Protected Member Functions inherited from CDPL::Math::Expression< E >
 Expression ()
 
 ~Expression ()
 

Detailed Description

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

Expression-template node combining a grid expression E1 (lhs) and a scalar E2 (rhs) element-wise via the binary functor F.

Template Parameters
E1The wrapped grid expression type.
E2The scalar type appearing on the right-hand side.
FThe binary functor type.

Member Typedef Documentation

◆ ValueType

template<typename E1 , typename E2 , typename F >
typedef F::ResultType CDPL::Math::Scalar2GridBinary< 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::Scalar2GridBinary< E1, E2, F >::ConstReference

Constant reference type to an element value.

◆ Reference

template<typename E1 , typename E2 , typename F >
typedef const ValueType CDPL::Math::Scalar2GridBinary< 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::Scalar2GridBinary< 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::Scalar2GridBinary< E1, E2, F >::ClosureType

Closure type used when this expression appears inside another expression.

◆ SizeType

template<typename E1 , typename E2 , typename F >
typedef E1::SizeType CDPL::Math::Scalar2GridBinary< E1, E2, F >::SizeType

The size type inherited from the wrapped grid expression.

◆ DifferenceType

template<typename E1 , typename E2 , typename F >
typedef E1::DifferenceType CDPL::Math::Scalar2GridBinary< E1, E2, F >::DifferenceType

The signed difference type inherited from the wrapped grid expression.

Constructor & Destructor Documentation

◆ Scalar2GridBinary()

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

Constructs the expression-template node combining the grid expression e1 and the scalar e2.

Parameters
e1The grid expression on the left-hand side.
e2The scalar value on the right-hand side.

Member Function Documentation

◆ getSize1()

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

Returns the size of the wrapped grid expression along the first dimension.

Returns
The wrapped expression's first-dimension size.

◆ getSize2()

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

Returns the size of the wrapped grid expression along the second dimension.

Returns
The wrapped expression's second-dimension size.

◆ getSize3()

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

Returns the size of the wrapped grid expression along the third dimension.

Returns
The wrapped expression's third-dimension size.

◆ operator()()

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

Applies the binary functor to the element at (i, j, k) of the wrapped grid expression and the scalar and returns the result.

Parameters
iThe zero-based first-dimension index.
jThe zero-based second-dimension index.
kThe zero-based third-dimension index.
Returns
The element value as combined by the functor.

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