STK++ 0.9.13
STK::hidden::OperatorHelper< Lhs, Rhs, UnaryFunctor, BinaryFunctor > Struct Template Reference

allow to disambiguate the case expr + number from the case expr + other_expr More...

#include <STK_BinarySelector.h>

Public Types

enum  { isUnary_ = int(hidden::Traits<Rhs>::structure_) == int(Arrays::number_) }
 
typedef hidden::Traits< Lhs >::Type LType
 
typedef hidden::Traits< Rhs >::Type RType
 
typedef UnaryOperator< UnaryFunctor, LhsUnaryResult
 
typedef BinaryOperator< BinaryFunctor, Lhs, RhsBinaryResult
 
typedef If< bool(isUnary_), UnaryFunctor, BinaryFunctor >::Result Functor
 
typedef If< bool(isUnary_), UnaryResult, BinaryResult >::Result Result
 

Public Member Functions

UnaryResult const unaryRun (ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
 

Static Public Member Functions

static Result const run (ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
 
static BinaryResult const binaryRun (ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
 

Detailed Description

template<typename Lhs, typename Rhs, typename UnaryFunctor, typename BinaryFunctor>
struct STK::hidden::OperatorHelper< Lhs, Rhs, UnaryFunctor, BinaryFunctor >

allow to disambiguate the case expr + number from the case expr + other_expr

Definition at line 85 of file STK_BinarySelector.h.

Member Typedef Documentation

◆ BinaryResult

◆ Functor

◆ LType

◆ Result

◆ RType

◆ UnaryResult

Member Enumeration Documentation

◆ anonymous enum

Enumerator
isUnary_ 

Definition at line 87 of file STK_BinarySelector.h.

88 {
89 isUnary_ = int(hidden::Traits<Rhs>::structure_) == int(Arrays::number_)
90 };
@ number_
(1,1) matrix/vector/array/expression (like a number)

Member Function Documentation

◆ binaryRun()

Definition at line 103 of file STK_BinarySelector.h.

104 { return BinaryResult(lhs.asDerived(), rhs.asDerived());}
BinaryOperator< BinaryFunctor, Lhs, Rhs > BinaryResult

◆ run()

Definition at line 100 of file STK_BinarySelector.h.

101 { return OperatorImpl<Functor, Lhs, Rhs, bool(isUnary_)>::run( lhs, rhs);}
If< bool(isUnary_), UnaryFunctor, BinaryFunctor >::Result Functor
static Result const run(ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)

References STK::hidden::OperatorHelper< Lhs, Rhs, UnaryFunctor, BinaryFunctor >::isUnary_, and STK::hidden::OperatorHelper< Lhs, Rhs, UnaryFunctor, BinaryFunctor >::run().

Referenced by STK::hidden::OperatorHelper< Lhs, Rhs, UnaryFunctor, BinaryFunctor >::run().

◆ unaryRun()

Definition at line 106 of file STK_BinarySelector.h.

107 { return UnaryResult(lhs.asDerived(), UnaryFunctor(lhs.elt()));}
UnaryOperator< UnaryFunctor, Lhs > UnaryResult

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