aimstil  5.0.5
til::expr Namespace Reference

namespace for template expressions. More...

Namespaces

 functor
 

Classes

class  FirstArgument
 Placeholder for the first argument. More...
 
class  SecondArgument
 Placeholder for the second argument. More...
 
class  TExpr
 A wrapper class of a template expression. More...
 
class  TExprBinaryOperator
 Apply a binary numerical functor to two template expressions. More...
 
class  TExprBinaryOperator_NoRes
 
class  TExprConstant
 A template expression class for constant values. More...
 
class  TExprCouple
 Evaluate one expression and then the other. More...
 
class  TExprFunctorHelper
 
class  TExprIfThen
 If/then block using template expressions. More...
 
class  TExprIfThenElse
 If/then block using template expressions. More...
 
class  TExprLValue
 A template expression class for left-values. More...
 
class  TExprUnaryOperator
 Apply a unary numerical functor to a template expression. More...
 
class  TExprValue
 Represent a constant in template expression. More...
 
class  ThirdArgument
 Placeholder for the third argument. More...
 

Functions

template<typename ExprIf , typename ExprThen >
TExpr< TExprIfThen< ExprIf, ExprThen > > if_then (const TExpr< ExprIf > &eIf, const TExpr< ExprThen > &eThen)
 if/then block for expressions More...
 
template<typename ExprIf , typename ExprThen , typename ExprElse >
TExpr< TExprIfThenElse< ExprIf, ExprThen, ExprElse > > if_then_else (const TExpr< ExprIf > &eIf, const TExpr< ExprThen > &eThen, const TExpr< ExprElse > &eElse)
 If/then/else structure for template expressions. More...
 
template<typename Expr >
TExpr< TExprUnaryOperator< Expr, functor::Sqrt > > sqrt (const TExpr< Expr > &e)
 Square root. More...
 
template<typename T >
TExpr< TExprLValue< T > > var (T &lvalue)
 Insert a left value in a template expression. More...
 
template<typename TFunctor >
boost::enable_if< is_detemplated_functor< TFunctor >, expr::TExprFunctorHelper< TFunctor > >::type func (TFunctor &f)
 
template<typename TFunctor >
boost::disable_if< is_detemplated_functor< TFunctor >, expr::TExprFunctorHelper< expr::functor::Wrap< TFunctor > > >::type func (TFunctor &f)
 
template<typename TTo , typename Expr >
TExpr< TExprUnaryOperator< Expr, functor::Cast< TTo > > > cast (const TExpr< Expr > &e)
 static type casting. More...
 
template<typename Expr1 , typename Expr2 >
TExpr< TExprBinaryOperator< Expr1, Expr2, functor::CastTo > > castTo (TExpr< Expr1 > e1, TExpr< Expr2 > e2)
 
 TIL_DEFINITION_UNARY_OPERATOR_EXPRS (operator-, functor::Negate)
 
 TIL_DEFINITION_UNARY_OPERATOR_EXPRS (abs, functor::Abs)
 
 TIL_DEFINITION_UNARY_OPERATOR_EXPRS (operator*, functor::Deref)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator+, functor::Plus)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator-, functor::Minus)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator*, functor::Multiplies)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator/, functor::Divides)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator<, functor::Less)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator<=, functor::Less_Equal)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator==, functor::Equal_To)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE (operator!=, functor::Not_Equal_To)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator+, functor::Plus)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator-, functor::Minus)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator*, functor::Multiplies)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator/, functor::Divides)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator<, functor::Less)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator<=, functor::Less_Equal)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator==, functor::Equal_To)
 
 TIL_DEFINITION_BINARY_OPERATOR_EXPRS (operator!=, functor::Not_Equal_To)
 
template<typename Expr1 , typename Expr2 >
TExpr< TExprCouple< Expr1, Expr2 > > operator, (const TExpr< Expr1 > &e1, const TExpr< Expr2 > &e2)
 Sequential evaluation of two template expressions. More...
 

Variables

const TExpr< expr::FirstArgument_1 = TExpr<FirstArgument>()
 Placeholder for the first argument. More...
 
const TExpr< expr::SecondArgument_2 = TExpr<SecondArgument>()
 Placeholder for the second argument. More...
 
const TExpr< expr::ThirdArgument_3 = TExpr<ThirdArgument>()
 Placeholder for the third argument. More...
 

Detailed Description

namespace for template expressions.

Function Documentation

◆ cast()

template<typename TTo , typename Expr >
TExpr<TExprUnaryOperator< Expr, functor::Cast<TTo> > > til::expr::cast ( const TExpr< Expr > &  e)
inline

static type casting.

Definition at line 133 of file TExprFunctions.h.

References til::expr::TExpr< Expr >::getExpr().

◆ castTo()

template<typename Expr1 , typename Expr2 >
TExpr<TExprBinaryOperator< Expr1, Expr2, functor::CastTo > > til::expr::castTo ( TExpr< Expr1 >  e1,
TExpr< Expr2 >  e2 
)
inline

◆ func() [1/2]

template<typename TFunctor >
boost::enable_if< is_detemplated_functor<TFunctor>, expr::TExprFunctorHelper<TFunctor> >::type til::expr::func ( TFunctor &  f)

Definition at line 83 of file TExprFunctions.h.

◆ func() [2/2]

template<typename TFunctor >
boost::disable_if< is_detemplated_functor<TFunctor>, expr::TExprFunctorHelper<expr::functor::Wrap<TFunctor> > >::type til::expr::func ( TFunctor &  f)

Definition at line 93 of file TExprFunctions.h.

◆ if_then()

template<typename ExprIf , typename ExprThen >
TExpr<TExprIfThen<ExprIf, ExprThen> > til::expr::if_then ( const TExpr< ExprIf > &  eIf,
const TExpr< ExprThen > &  eThen 
)

if/then block for expressions

Parameters
eIfThis expression has to return a boolean
eThenExecuted if eIf returns true

Definition at line 24 of file TExprFunctions.h.

References til::expr::TExpr< Expr >::getExpr().

◆ if_then_else()

template<typename ExprIf , typename ExprThen , typename ExprElse >
TExpr<TExprIfThenElse<ExprIf, ExprThen, ExprElse> > til::expr::if_then_else ( const TExpr< ExprIf > &  eIf,
const TExpr< ExprThen > &  eThen,
const TExpr< ExprElse > &  eElse 
)

If/then/else structure for template expressions.

Parameters
eIfThis expression has to return a boolean
eThenExecuted if eIf returns true
eElseExecuted if eIf returns false

Definition at line 36 of file TExprFunctions.h.

References til::expr::TExpr< Expr >::getExpr().

◆ operator,()

template<typename Expr1 , typename Expr2 >
TExpr<TExprCouple<Expr1, Expr2> > til::expr::operator, ( const TExpr< Expr1 > &  e1,
const TExpr< Expr2 > &  e2 
)

Sequential evaluation of two template expressions.

Parameters
e1This expression is evaluated first
e2This expression is evaluated last

Definition at line 118 of file TExprOperators.h.

References til::expr::TExpr< Expr >::getExpr().

◆ sqrt()

template<typename Expr >
TExpr< TExprUnaryOperator< Expr, functor::Sqrt> > til::expr::sqrt ( const TExpr< Expr > &  e)

Square root.

Definition at line 51 of file TExprFunctions.h.

References til::expr::TExpr< Expr >::getExpr().

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [1/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( operator+  ,
functor::Plus   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [2/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( operator-  ,
functor::Minus   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [3/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( operator*  ,
functor::Multiplies   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [4/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( operator/  ,
functor::Divides   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [5/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( )

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [6/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( operator<=  ,
functor::Less_Equal   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [7/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( operator  = =,
functor::Equal_To   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE() [8/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPR_VALUE ( operator!  ,
functor::Not_Equal_To   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [1/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( operator+  ,
functor::Plus   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [2/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( operator-  ,
functor::Minus   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [3/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( operator*  ,
functor::Multiplies   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [4/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( operator/  ,
functor::Divides   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [5/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( )

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [6/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( operator<=  ,
functor::Less_Equal   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [7/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( operator  = =,
functor::Equal_To   
)

◆ TIL_DEFINITION_BINARY_OPERATOR_EXPRS() [8/8]

til::expr::TIL_DEFINITION_BINARY_OPERATOR_EXPRS ( operator!  ,
functor::Not_Equal_To   
)

◆ TIL_DEFINITION_UNARY_OPERATOR_EXPRS() [1/3]

til::expr::TIL_DEFINITION_UNARY_OPERATOR_EXPRS ( operator-  ,
functor::Negate   
)

◆ TIL_DEFINITION_UNARY_OPERATOR_EXPRS() [2/3]

til::expr::TIL_DEFINITION_UNARY_OPERATOR_EXPRS ( abs  ,
functor::Abs   
)

◆ TIL_DEFINITION_UNARY_OPERATOR_EXPRS() [3/3]

til::expr::TIL_DEFINITION_UNARY_OPERATOR_EXPRS ( operator*  ,
functor::Deref   
)

◆ var()

template<typename T >
TExpr<TExprLValue<T> > til::expr::var ( T &  lvalue)

Insert a left value in a template expression.

Definition at line 73 of file TExprFunctions.h.

Variable Documentation

◆ _1

◆ _2

◆ _3