STK++ 1.0

STK::UnOp< Op, Exp > Class Template Reference

UnOp class for unary operators. More...

#include <STK_TExpAlgebra.h>

List of all members.

Public Member Functions

 UnOp (const Exp &X)
 Default constructor.
 ~UnOp ()
 destructor.
Real operator[] (Integer i) const
 Op will be Uplus or Uminus.
Real operator() (Integer i) const
 Op will be Uplus or Uminus.
template<class Right >
BinOp< Plus, _This, Right > operator+ (const Right &rhs)
 Operator Plus.
template<class Right >
BinOp< Minus, _This, Right > operator- (const Right &rhs)
 Operator Minus.
template<class Right >
BinOp< Mult, _This, Right > operator* (const Right &rhs)
 Operator Mult.
template<class Right >
BinOp< Div, _This, Right > operator/ (const Right &rhs)
 Operator Div.

Protected Attributes

const Exp & rhs_
 Right hand Side expression.

Private Types

typedef UnOp< Op, Exp > _This

Detailed Description

template<class Op, class Exp>
class STK::UnOp< Op, Exp >

UnOp class for unary operators.

Definition at line 421 of file STK_TExpAlgebra.h.


Member Typedef Documentation

template<class Op , class Exp >
typedef UnOp<Op, Exp> STK::UnOp< Op, Exp >::_This [private]

Definition at line 423 of file STK_TExpAlgebra.h.


Constructor & Destructor Documentation

template<class Op , class Exp >
STK::UnOp< Op, Exp >::UnOp ( const Exp &  X) [inline]

Default constructor.

Definition at line 430 of file STK_TExpAlgebra.h.

                       : rhs_(X)
    { ;}
template<class Op , class Exp >
STK::UnOp< Op, Exp >::~UnOp ( ) [inline]

destructor.

Definition at line 434 of file STK_TExpAlgebra.h.

{}

Member Function Documentation

template<class Op , class Exp >
Real STK::UnOp< Op, Exp >::operator[] ( Integer  i) const [inline]

Op will be Uplus or Uminus.

Definition at line 437 of file STK_TExpAlgebra.h.

References STK::UnOp< Op, Exp >::rhs_.

    { return Op::apply(rhs_[i]);}
template<class Op , class Exp >
Real STK::UnOp< Op, Exp >::operator() ( Integer  i) const [inline]

Op will be Uplus or Uminus.

Definition at line 441 of file STK_TExpAlgebra.h.

References STK::UnOp< Op, Exp >::rhs_.

    { return Op::apply(rhs_(i));}
template<class Op , class Exp >
template<class Right >
BinOp<Plus, _This, Right> STK::UnOp< Op, Exp >::operator+ ( const Right &  rhs) [inline]

Operator Plus.

Definition at line 446 of file STK_TExpAlgebra.h.

    { return BinOp<Plus, _This, Right>(*this, rhs); }
template<class Op , class Exp >
template<class Right >
BinOp<Minus, _This, Right> STK::UnOp< Op, Exp >::operator- ( const Right &  rhs) [inline]

Operator Minus.

Definition at line 451 of file STK_TExpAlgebra.h.

    { return BinOp<Minus, _This, Right>(*this, rhs);}
template<class Op , class Exp >
template<class Right >
BinOp<Mult, _This, Right> STK::UnOp< Op, Exp >::operator* ( const Right &  rhs) [inline]

Operator Mult.

Definition at line 456 of file STK_TExpAlgebra.h.

    { return BinOp<Mult, _This, Right>(*this, rhs);}
template<class Op , class Exp >
template<class Right >
BinOp<Div, _This, Right> STK::UnOp< Op, Exp >::operator/ ( const Right &  rhs) [inline]

Operator Div.

Definition at line 462 of file STK_TExpAlgebra.h.

    { return BinOp<Div, _This, Right>(*this, rhs);}

Member Data Documentation

template<class Op , class Exp >
const Exp& STK::UnOp< Op, Exp >::rhs_ [protected]

Right hand Side expression.

Definition at line 426 of file STK_TExpAlgebra.h.

Referenced by STK::UnOp< Op, Exp >::operator()(), and STK::UnOp< Op, Exp >::operator[]().


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