37#ifndef STK_BINARYSELECTOR_H
38#define STK_BINARYSELECTOR_H
50template<
typename Lhs,
typename Rhs,
int operatorType_>
55template<
typename Functor,
typename Lhs,
typename Rhs,
bool isNumber>
58template<
typename Functor,
typename Lhs,
typename Rhs>
67 {
return Result(lhs.asDerived(), Functor(rhs.elt()) );}
70template<
typename Functor,
typename Lhs,
typename Rhs>
79 {
return Result(lhs.asDerived(), rhs.asDerived());}
84template<
typename Lhs,
typename Rhs,
typename UnaryFunctor,
typename BinaryFunctor>
104 {
return BinaryResult(lhs.asDerived(), rhs.asDerived());}
107 {
return UnaryResult(lhs.asDerived(), UnaryFunctor(lhs.elt()));}
113template<
typename Lhs,
typename Rhs>
126template<
typename Lhs,
typename Rhs>
139template<
typename Lhs,
typename Rhs>
152template<
typename Lhs,
typename Rhs>
165template<
typename Lhs,
typename Rhs>
178template<
typename Lhs,
typename Rhs>
191template<
typename Lhs,
typename Rhs>
204template<
typename Lhs,
typename Rhs>
217template<
typename Lhs,
typename Rhs>
230template<
typename Lhs,
typename Rhs>
243template<
typename Lhs,
typename Rhs>
256template<
typename Lhs,
typename Rhs>
269template<
typename Lhs,
typename Rhs>
282template<
typename Lhs,
typename Rhs>
295template<
typename Lhs,
typename Rhs>
308template<
typename Lhs,
typename Rhs>
321template<
typename Lhs,
typename Rhs>
334template<
typename Lhs,
typename Rhs>
Generic expression where a binary operator is applied to two expressions.
base class for template evaluation expressions and visitors.
Generic expression when unary operator is applied to an expression.
@ number_
(1,1) matrix/vector/array/expression (like a number)
the namespace Arrays contain the enum and utilities method used by the containers classes.
The hidden namespace enclose the classes and methods which are used internally by the STK++ classes.
The namespace STK is the main domain space of the Statistical ToolKit project.
Template functor which compute the bitwise and of two numbers.
Template functor to compute the bitwise and with a fixed value.
Template functor which compute the bitwise or of two numbers.
Template functor to compute the bitwise or with a fixed value.
Template functor which compute the bitwise xor of two numbers.
Template functor to compute the bitwise xor with a fixed value.
Template functor which compute the difference of two numbers.
Template functor to add a number to a fixed value.
Template functor which compute the division of two numbers.
Template functor to divide a number by a fixed value.
Template functor testing if a number is equal to an other number.
Template functor to test if a number is equal to a fixed value.
Template functor testing if a number is greater or equal than an other number.
Template functor to test if a number is greater or equal than a fixed value.
Template functor testing if a number is greater than an other number.
Template functor to test if a number is greater than a fixed value.
Template functor testing if a number is less or equal than an other number.
Template functor to test if a number is less or equal than a fixed value.
Template functor testing if a number is less than an other number.
Template functor to test if a number is less than a fixed value.
Template functor which compute the logical and of two numbers.
Template functor computing logical and with a fixed value.
Template functor which compute the logical or of two numbers.
Template functor computing logical and with a fixed value.
Template functor which compute the maximum of two numbers.
Template functor to compute the minimum with a fixed value.
Template functor which compute the minimum of two numbers.
Template functor to compute the minimum between a fixed value.
Template functor which compute the modulo of two numbers.
Template functor to compute the minimum with a fixed value.
Template functor testing if a number is not equal to an other number.
Template functor to test if a number is different than a fixed value.
Template functor which compute the product of two numbers.
Template functor computing the product of a number by a fixed value.
Template functor which compute the sum of two numbers.
Template functor to add a number to a fixed value.
Select a type at compile time.
allow to disambiguate the case expr + number from the case expr + other_expr
UnaryResult const unaryRun(ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
If< bool(isUnary_), UnaryResult, BinaryResult >::Result Result
hidden::Traits< Rhs >::Type RType
static BinaryResult const binaryRun(ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
If< bool(isUnary_), UnaryFunctor, BinaryFunctor >::Result Functor
hidden::Traits< Lhs >::Type LType
UnaryOperator< UnaryFunctor, Lhs > UnaryResult
BinaryOperator< BinaryFunctor, Lhs, Rhs > BinaryResult
static Result const run(ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
hidden::Traits< Lhs >::Type LType
BinaryOperator< Functor, Lhs, Rhs > Result
static Result const run(ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
hidden::Traits< Rhs >::Type RType
hidden::Traits< Rhs >::Type Rtype
static Result const run(ExprBase< Lhs > const &lhs, ExprBase< Rhs > const &rhs)
hidden::Traits< Lhs >::Type Ltype
UnaryOperator< Functor, Lhs > Result
allow to disambiguate the case expr + number from the case expr + other_expr
OperatorHelper< Lhs, Rhs, BitwiseAndWithOp< typename hidden::Traits< Lhs >::Type >, BitwiseAndOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, BitwiseOrWithOp< typename hidden::Traits< Lhs >::Type >, BitwiseOrOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, BitwiseXorWithOp< typename hidden::Traits< Lhs >::Type >, BitwiseXorOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, DifferenceWithOp< typename hidden::Traits< Lhs >::Type >, DifferenceOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, DivisionWithOp< typename hidden::Traits< Lhs >::Type >, DivisionOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, EqualWithOp< typename hidden::Traits< Lhs >::Type >, EqualOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, GreaterThanOp< typename hidden::Traits< Lhs >::Type >, GreaterOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, GeqThanOp< typename hidden::Traits< Lhs >::Type >, GeqOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, LessThanOp< typename hidden::Traits< Lhs >::Type >, LessOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, LeqThanOp< typename hidden::Traits< Lhs >::Type >, LeqOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, LogicalAndWithOp< typename hidden::Traits< Lhs >::Type >, LogicalAndOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, LogicalOrWithOp< typename hidden::Traits< Lhs >::Type >, LogicalOrOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, MaxWithOp< typename hidden::Traits< Lhs >::Type >, MaxOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, MinWithOp< typename hidden::Traits< Lhs >::Type >, MinOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, ModuloWithOp< typename hidden::Traits< Lhs >::Type >, ModuloOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, NotEqualWithOp< typename hidden::Traits< Lhs >::Type >, NotEqualOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, ProductWithOp< typename hidden::Traits< Lhs >::Type >, ProductOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
OperatorHelper< Lhs, Rhs, SumWithOp< typename hidden::Traits< Lhs >::Type >, SumOp< typename hidden::Traits< Rhs >::Type, typename hidden::Traits< Rhs >::Type > > Selector
helper defining the return type of the selector involving expressions of the form expr + number and e...