GenericActive< valuetype > Class Template Reference

#include <Active.h>

Inheritance diagram for GenericActive< valuetype >:

Public Member Functions

 GenericActive (void)
 
 GenericActive (const GenericActive< valuetype > &)
 
 GenericActive (valuetype)
 
 ~GenericActive (void)
 
GenericActive< valuetype > operator- (void) const
 
GenericActive< valuetype > operator+ (valuetype rhs) const
 
GenericActive< valuetype > operator+ (const GenericActive< valuetype > &rhs) const
 
friend GenericActive (::operator+<valuetype >)(valuetype
 
GenericActive< valuetype > operator- (const GenericActive< valuetype > &rhs) const
 
friend GenericActive (::operator-<valuetype >)(valuetype
 
GenericActive< valuetype > operator* (valuetype rhs) const
 
friend GenericActive (::operator*<valuetype >)(valuetype lhs
 
GenericActive< valuetype > operator/ (const GenericActive< valuetype > &rhs) const
 
GenericActive< valuetype > operator/ (valuetype rhs) const
 
friend GenericActive (::operator/<valuetype >)(valuetype
 
void exp_ (void)
 
void log_ (void)
 
void log10_ (void)
 
void sin_ (void)
 
void asin_ (void)
 
void cos_ (void)
 
void acos_ (void)
 
void tan_ (void)
 
void atan_ (void)
 
void sinh_ (void)
 
void cosh_ (void)
 
void sqrt_ (void)
 
void curt_ (void)
 
void pow_ (valuetype)
 
void pow_ (const GenericActive< valuetype > &)
 
void fabs_ (void)
 
void negate_ (void)
 
bool operator!= (const GenericActive< valuetype > &) const
 Compare only values (not derivatives) More...
 
bool operator== (const GenericActive< valuetype > &) const
 Compare only values (not derivatives) More...
 
bool operator<= (const GenericActive< valuetype > &) const
 Compare only values (not derivatives) More...
 
bool operator>= (const GenericActive< valuetype > &) const
 Compare only values (not derivatives) More...
 
bool operator< (const GenericActive< valuetype > &) const
 Compare only values (not derivatives) More...
 
bool operator> (const GenericActive< valuetype > &) const
 Compare only values (not derivatives) More...
 
bool operator!= (valuetype rhs) const
 Compare only values (not derivatives) More...
 
bool operator== (valuetype rhs) const
 Compare only values (not derivatives) More...
 
bool operator<= (valuetype rhs) const
 Compare only values (not derivatives) More...
 
bool operator>= (valuetype rhs) const
 Compare only values (not derivatives) More...
 
bool operator< (valuetype rhs) const
 Compare only values (not derivatives) More...
 
bool operator> (valuetype rhs) const
 Compare only values (not derivatives) More...
 
GenericActive< valuetype > & operator= (const GenericActive< valuetype > &a)
 
GenericActive< valuetype > & operator= (valuetype v)
 
GenericActive< valuetype > & operator+= (const GenericActive< valuetype > &a)
 
GenericActive< valuetype > & operator+= (valuetype v)
 
GenericActive< valuetype > & operator-= (const GenericActive< valuetype > &a)
 
GenericActive< valuetype > & operator-= (valuetype v)
 
GenericActive< valuetype > & operator*= (const GenericActive< valuetype > &a)
 
GenericActive< valuetype > & operator*= (valuetype v)
 
GenericActive< valuetype > & operator/= (const GenericActive< valuetype > &a)
 
GenericActive< valuetype > & operator/= (valuetype a)
 
valuetype & Val (void)
 Returns the value. More...
 
void clear (void)
 set to zero and clear derivatives More...
 
void setDer (int _i, valuetype v)
 
const valuetype & val (void) const
 Returns the value. More...
 
GenericActive< valuetype > adval (void) const
 returns a new object with zero value but the derivative of the current object More...
 
valuetype dernorm (void) const
 returns the infinity-norm of the derivative More...
 
const valuetype & der (int _i) const
 
void setActive (int p)
 
void setInactive (int p)
 marks the variable as non active without wiping out the derivatives information More...
 
bool isGenericActive (void)
 
void clearderivative (void)
 wipes out the derivatives information More...
 
std::string printFull (void) const
 

Protected Attributes

valuetype val_
 

Friends

const GenericActive< valuetype > & rhs
 
const GenericActive< valuetype > &GenericActive< valuetype > operator- (valuetype rhs) const
 
const GenericActive< valuetype > &GenericActive< valuetype > operator* (const GenericActive< valuetype > &rhs) const
 
const GenericActive< valuetype > &void increment_ (valuetype f)
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseActive
static void rollContext (int n)
 
static void unRollContext (void)
 unsets previous number of directions More...
 
static int context (void)
 
- Static Protected Attributes inherited from BaseActive
static int numdir
 

Detailed Description

template<class valuetype>
class GenericActive< valuetype >

Interface for the implementation of analytical derivates.
Contains foundamental function derivates.
#include <libpf/value/Active.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ GenericActive() [1/7]

template<class valuetype >
GenericActive< valuetype >::GenericActive ( void  )

◆ GenericActive() [2/7]

template<class valuetype >
GenericActive< valuetype >::GenericActive ( const GenericActive< valuetype > &  )

◆ GenericActive() [3/7]

template<class valuetype >
GenericActive< valuetype >::GenericActive ( valuetype  )
explicit

◆ ~GenericActive()

template<class valuetype >
GenericActive< valuetype >::~GenericActive ( void  )

◆ GenericActive() [4/7]

template<class valuetype >
GenericActive< valuetype >::GenericActive ( ::operator+<valuetype >  )

◆ GenericActive() [5/7]

template<class valuetype >
GenericActive< valuetype >::GenericActive ( ::operator-<valuetype >  )

◆ GenericActive() [6/7]

template<class valuetype >
GenericActive< valuetype >::GenericActive ( ::operator*<valuetype >  )

◆ GenericActive() [7/7]

template<class valuetype >
GenericActive< valuetype >::GenericActive ( ::operator/<valuetype >  )

Member Function Documentation

◆ acos_()

template<class valuetype >
void GenericActive< valuetype >::acos_ ( void  )

◆ adval()

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::adval ( void  ) const

returns a new object with zero value but the derivative of the current object

◆ asin_()

template<class valuetype >
void GenericActive< valuetype >::asin_ ( void  )

◆ atan_()

template<class valuetype >
void GenericActive< valuetype >::atan_ ( void  )

◆ clear()

template<class valuetype >
void GenericActive< valuetype >::clear ( void  )

set to zero and clear derivatives

◆ clearderivative()

template<class valuetype >
void GenericActive< valuetype >::clearderivative ( void  )

wipes out the derivatives information

◆ cos_()

template<class valuetype >
void GenericActive< valuetype >::cos_ ( void  )

◆ cosh_()

template<class valuetype >
void GenericActive< valuetype >::cosh_ ( void  )

◆ curt_()

template<class valuetype >
void GenericActive< valuetype >::curt_ ( void  )

◆ der()

template<class valuetype >
const valuetype & GenericActive< valuetype >::der ( int  _i) const

◆ dernorm()

template<class valuetype >
valuetype GenericActive< valuetype >::dernorm ( void  ) const

returns the infinity-norm of the derivative

◆ exp_()

template<class valuetype >
void GenericActive< valuetype >::exp_ ( void  )

◆ fabs_()

template<class valuetype >
void GenericActive< valuetype >::fabs_ ( void  )

◆ isGenericActive()

template<class valuetype >
bool GenericActive< valuetype >::isGenericActive ( void  )

◆ log10_()

template<class valuetype >
void GenericActive< valuetype >::log10_ ( void  )

◆ log_()

template<class valuetype >
void GenericActive< valuetype >::log_ ( void  )

◆ negate_()

template<class valuetype >
void GenericActive< valuetype >::negate_ ( void  )

◆ operator!=() [1/2]

template<class valuetype >
bool GenericActive< valuetype >::operator!= ( const GenericActive< valuetype > &  ) const

Compare only values (not derivatives)

◆ operator!=() [2/2]

template<class valuetype >
bool GenericActive< valuetype >::operator!= ( valuetype  rhs) const

Compare only values (not derivatives)

◆ operator*()

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::operator* ( valuetype  rhs) const

◆ operator*=() [1/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator*= ( const GenericActive< valuetype > &  a)

◆ operator*=() [2/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator*= ( valuetype  v)

◆ operator+() [1/2]

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::operator+ ( const GenericActive< valuetype > &  rhs) const

◆ operator+() [2/2]

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::operator+ ( valuetype  rhs) const

◆ operator+=() [1/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator+= ( const GenericActive< valuetype > &  a)

◆ operator+=() [2/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator+= ( valuetype  v)

◆ operator-() [1/2]

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::operator- ( const GenericActive< valuetype > &  rhs) const

◆ operator-() [2/2]

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::operator- ( void  ) const

◆ operator-=() [1/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator-= ( const GenericActive< valuetype > &  a)

◆ operator-=() [2/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator-= ( valuetype  v)

◆ operator/() [1/2]

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::operator/ ( const GenericActive< valuetype > &  rhs) const

◆ operator/() [2/2]

template<class valuetype >
GenericActive< valuetype > GenericActive< valuetype >::operator/ ( valuetype  rhs) const

◆ operator/=() [1/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator/= ( const GenericActive< valuetype > &  a)

◆ operator/=() [2/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator/= ( valuetype  a)

◆ operator<() [1/2]

template<class valuetype >
bool GenericActive< valuetype >::operator< ( const GenericActive< valuetype > &  ) const

Compare only values (not derivatives)

◆ operator<() [2/2]

template<class valuetype >
bool GenericActive< valuetype >::operator< ( valuetype  rhs) const

Compare only values (not derivatives)

◆ operator<=() [1/2]

template<class valuetype >
bool GenericActive< valuetype >::operator<= ( const GenericActive< valuetype > &  ) const

Compare only values (not derivatives)

◆ operator<=() [2/2]

template<class valuetype >
bool GenericActive< valuetype >::operator<= ( valuetype  rhs) const

Compare only values (not derivatives)

◆ operator=() [1/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator= ( const GenericActive< valuetype > &  a)

◆ operator=() [2/2]

template<class valuetype >
GenericActive< valuetype > & GenericActive< valuetype >::operator= ( valuetype  v)

◆ operator==() [1/2]

template<class valuetype >
bool GenericActive< valuetype >::operator== ( const GenericActive< valuetype > &  ) const

Compare only values (not derivatives)

◆ operator==() [2/2]

template<class valuetype >
bool GenericActive< valuetype >::operator== ( valuetype  rhs) const

Compare only values (not derivatives)

◆ operator>() [1/2]

template<class valuetype >
bool GenericActive< valuetype >::operator> ( const GenericActive< valuetype > &  ) const

Compare only values (not derivatives)

◆ operator>() [2/2]

template<class valuetype >
bool GenericActive< valuetype >::operator> ( valuetype  rhs) const

Compare only values (not derivatives)

◆ operator>=() [1/2]

template<class valuetype >
bool GenericActive< valuetype >::operator>= ( const GenericActive< valuetype > &  ) const

Compare only values (not derivatives)

◆ operator>=() [2/2]

template<class valuetype >
bool GenericActive< valuetype >::operator>= ( valuetype  rhs) const

Compare only values (not derivatives)

◆ pow_() [1/2]

template<class valuetype >
void GenericActive< valuetype >::pow_ ( const GenericActive< valuetype > &  )

◆ pow_() [2/2]

template<class valuetype >
void GenericActive< valuetype >::pow_ ( valuetype  )

◆ printFull()

template<class valuetype >
std::string GenericActive< valuetype >::printFull ( void  ) const

◆ setActive()

template<class valuetype >
void GenericActive< valuetype >::setActive ( int  p)

Activator for analytical derivate calculation
By default set the derivative of the current quantity referred to the p-th variable.
Example: T.setActive(0) instance T call setActive for the $[0] variable that mean
dT/d$[0] = 1.0

Parameters
pDerivation variable index

◆ setDer()

template<class valuetype >
void GenericActive< valuetype >::setDer ( int  _i,
valuetype  v 
)

◆ setInactive()

template<class valuetype >
void GenericActive< valuetype >::setInactive ( int  p)

marks the variable as non active without wiping out the derivatives information

◆ sin_()

template<class valuetype >
void GenericActive< valuetype >::sin_ ( void  )

◆ sinh_()

template<class valuetype >
void GenericActive< valuetype >::sinh_ ( void  )

◆ sqrt_()

template<class valuetype >
void GenericActive< valuetype >::sqrt_ ( void  )

◆ tan_()

template<class valuetype >
void GenericActive< valuetype >::tan_ ( void  )

◆ Val()

template<class valuetype >
valuetype & GenericActive< valuetype >::Val ( void  )

Returns the value.

◆ val()

template<class valuetype >
const valuetype & GenericActive< valuetype >::val ( void  ) const

Returns the value.

Friends And Related Function Documentation

◆ increment_

template<class valuetype >
const GenericActive< valuetype > &void increment_ ( valuetype  f)
friend

◆ operator*

template<class valuetype >
const GenericActive< valuetype > &GenericActive< valuetype > operator* ( const GenericActive< valuetype > &  rhs) const
friend

◆ operator-

template<class valuetype >
const GenericActive< valuetype > &GenericActive< valuetype > operator- ( valuetype  rhs) const
friend

◆ rhs

template<class valuetype >
friend const GenericActive<valuetype>& rhs
friend

Member Data Documentation

◆ val_

template<class valuetype >
valuetype GenericActive< valuetype >::val_
protected

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