NeoPZ
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
Fad< T > Class Template Reference

#include <fad.h>

Inheritance diagram for Fad< T >:
[legend]
Collaboration diagram for Fad< T >:
[legend]

Public Types

typedef T value_type
 

Public Member Functions

template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
void copy (const Fad< R > &rhs)
 
 Fad ()
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
 Fad (const R &x)
 
 Fad (const int sz, const T &x)
 
 Fad (const int sz, const int i, const T &x)
 
 Fad (const int sz, const T &x, const T &dx)
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
 Fad (const Fad< R > &rhs)
 
template<class ExprT >
 Fad (const FadExpr< ExprT > &fadexpr)
 
 ~Fad ()
 
void diff (const int ith, const int n)
 
const Vector< T > & dx () const
 
const T & val () const
 
T & val ()
 
bool hasFastAccess () const
 
T & fastAccessDx (int i)
 
const T & fastAccessDx (int i) const
 
const T & d (int i) const
 
const T & dx (int i) const
 
dx (int i)
 
int size () const
 
template<class ExprT >
Fad< T > & operator= (const FadExpr< ExprT > &fadexpr)
 
FadExpr< FadUnaryPlus< Fad< T > > > operator+ () const
 
FadExpr< FadUnaryMin< Fad< T > > > operator- () const
 
Fad< T > & operator+= (const T &x)
 
Fad< T > & operator-= (const T &x)
 
Fad< T > & operator*= (const T &x)
 
Fad< T > & operator/= (const T &x)
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T > & operator+= (const Fad< R > &x)
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T > & operator-= (const Fad< R > &x)
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T > & operator*= (const Fad< R > &x)
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T > & operator/= (const Fad< R > &x)
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T > & operator= (const R &val)
 
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T > & operator= (const Fad< R > &rhs)
 
int ClassId () const
 
template<class ExprT >
Fad< T > & operator*= (const FadExpr< ExprT > &fadexpr)
 
template<class ExprT >
Fad< T > & operator/= (const FadExpr< ExprT > &fadexpr)
 
template<class ExprT >
Fad< T > & operator+= (const FadExpr< ExprT > &fadexpr)
 
template<class ExprT >
Fad< T > & operator-= (const FadExpr< ExprT > &fadexpr)
 

Public Attributes

defaultVal
 

Protected Attributes

val_
 
Vector< T > dx_
 

Friends

ostream & operator<< (ostream &stream, const Fad< T > &x)
 
istream & operator>> (istream &stream, Fad< T > &x)
 

Additional Inherited Members

- Protected Member Functions inherited from FadSuper
 FadSuper ()
 
 FadSuper (const FadSuper &)
 
 ~FadSuper ()
 

Detailed Description

template<class T>
class Fad< T >

Definition at line 54 of file fad.h.

Member Typedef Documentation

◆ value_type

template<class T>
typedef T Fad< T >::value_type

Definition at line 56 of file fad.h.

Constructor & Destructor Documentation

◆ Fad() [1/7]

template<class T>
Fad< T >::Fad ( )
inline

Definition at line 78 of file fad.h.

◆ Fad() [2/7]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T >::Fad ( const R &  x)
inline

Definition at line 81 of file fad.h.

◆ Fad() [3/7]

template<class T>
Fad< T >::Fad ( const int  sz,
const T &  x 
)
inline

Definition at line 82 of file fad.h.

◆ Fad() [4/7]

template<class T>
Fad< T >::Fad ( const int  sz,
const int  i,
const T &  x 
)
inline

Definition at line 83 of file fad.h.

◆ Fad() [5/7]

template<class T>
Fad< T >::Fad ( const int  sz,
const T &  x,
const T &  dx 
)
inline

Definition at line 85 of file fad.h.

◆ Fad() [6/7]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad< T >::Fad ( const Fad< R > &  rhs)
inline

Definition at line 87 of file fad.h.

◆ Fad() [7/7]

template<class T>
template<class ExprT >
Fad< T >::Fad ( const FadExpr< ExprT > &  fadexpr)
inline

Definition at line 93 of file fad.h.

References FadExpr< T >::dx(), and FadExpr< T >::size().

◆ ~Fad()

template<class T>
Fad< T >::~Fad ( )
inline

Definition at line 106 of file fad.h.

Member Function Documentation

◆ ClassId()

template<class T >
int Fad< T >::ClassId ( ) const

Definition at line 660 of file fad.h.

References Hash().

◆ copy()

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
void Fad< T >::copy ( const Fad< R > &  rhs)
inline

Definition at line 59 of file fad.h.

References Fad< T >::dx(), Vector< T >::size(), and Fad< T >::val().

◆ d()

template<class T>
const T& Fad< T >::d ( int  i) const
inline

Definition at line 119 of file fad.h.

◆ diff()

template<class T >
void Fad< T >::diff ( const int  ith,
const int  n 
)
inline

Definition at line 306 of file fad.h.

◆ dx() [1/3]

template<class T>
const Vector<T>& Fad< T >::dx ( ) const
inline

◆ dx() [2/3]

template<class T>
const T& Fad< T >::dx ( int  i) const
inline

Definition at line 124 of file fad.h.

References Vector< T >::size().

◆ dx() [3/3]

template<class T>
T Fad< T >::dx ( int  i)
inline

Definition at line 125 of file fad.h.

References Vector< T >::size(), and tmp.

◆ fastAccessDx() [1/2]

template<class T>
T& Fad< T >::fastAccessDx ( int  i)
inline

Definition at line 117 of file fad.h.

Referenced by main().

◆ fastAccessDx() [2/2]

template<class T>
const T& Fad< T >::fastAccessDx ( int  i) const
inline

Definition at line 118 of file fad.h.

◆ hasFastAccess()

template<class T>
bool Fad< T >::hasFastAccess ( ) const
inline

Definition at line 115 of file fad.h.

References Vector< T >::size().

◆ operator*=() [1/3]

template<class T >
Fad< T > & Fad< T >::operator*= ( const T &  x)
inline

Definition at line 363 of file fad.h.

References RESTRICT, and val().

◆ operator*=() [2/3]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad<T>& Fad< T >::operator*= ( const Fad< R > &  x)
inline

◆ operator*=() [3/3]

template<class T >
template<class ExprT >
Fad< T > & Fad< T >::operator*= ( const FadExpr< ExprT > &  fadexpr)
inline

◆ operator+()

template<class T >
FadExpr< FadUnaryPlus< Fad< T > > > Fad< T >::operator+ ( ) const
inline

Definition at line 337 of file fad.h.

◆ operator+=() [1/3]

template<class T >
Fad< T > & Fad< T >::operator+= ( const T &  x)
inline

Definition at line 349 of file fad.h.

References val().

◆ operator+=() [2/3]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad<T>& Fad< T >::operator+= ( const Fad< R > &  x)
inline

◆ operator+=() [3/3]

template<class T >
template<class ExprT >
Fad< T > & Fad< T >::operator+= ( const FadExpr< ExprT > &  fadexpr)
inline

◆ operator-()

template<class T >
FadExpr< FadUnaryMin< Fad< T > > > Fad< T >::operator- ( ) const
inline

Definition at line 343 of file fad.h.

◆ operator-=() [1/3]

template<class T >
Fad< T > & Fad< T >::operator-= ( const T &  x)
inline

Definition at line 356 of file fad.h.

References val().

◆ operator-=() [2/3]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad<T>& Fad< T >::operator-= ( const Fad< R > &  x)
inline

◆ operator-=() [3/3]

template<class T >
template<class ExprT >
Fad< T > & Fad< T >::operator-= ( const FadExpr< ExprT > &  fadexpr)
inline

◆ operator/=() [1/3]

template<class T >
Fad< T > & Fad< T >::operator/= ( const T &  x)
inline

Definition at line 377 of file fad.h.

References RESTRICT, and val().

◆ operator/=() [2/3]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad<T>& Fad< T >::operator/= ( const Fad< R > &  x)
inline

◆ operator/=() [3/3]

template<class T >
template<class ExprT >
Fad< T > & Fad< T >::operator/= ( const FadExpr< ExprT > &  fadexpr)
inline

◆ operator=() [1/3]

template<class T >
template<class ExprT >
Fad< T > & Fad< T >::operator= ( const FadExpr< ExprT > &  fadexpr)
inline

◆ operator=() [2/3]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad<T>& Fad< T >::operator= ( const R &  val)
inline

Definition at line 252 of file fad.h.

References Vector< T >::size(), and val().

◆ operator=() [3/3]

template<class T>
template<typename R , typename enable_if< is_convertible< R, T >::value, int >::type * = nullptr>
Fad<T>& Fad< T >::operator= ( const Fad< R > &  rhs)
inline

Definition at line 262 of file fad.h.

References operator-=().

◆ size()

template<class T>
int Fad< T >::size ( ) const
inline

◆ val() [1/2]

template<class T>
const T& Fad< T >::val ( ) const
inline

◆ val() [2/2]

template<class T>
T& Fad< T >::val ( )
inline

Definition at line 113 of file fad.h.

Friends And Related Function Documentation

◆ operator<<

template<class T>
ostream& operator<< ( ostream &  stream,
const Fad< T > &  x 
)
friend

Definition at line 276 of file fad.h.

◆ operator>>

template<class T>
istream& operator>> ( istream &  stream,
Fad< T > &  x 
)
friend

Definition at line 286 of file fad.h.

Member Data Documentation

◆ defaultVal

template<class T>
T Fad< T >::defaultVal

Definition at line 76 of file fad.h.

◆ dx_

template<class T>
Vector<T> Fad< T >::dx_
protected

Definition at line 72 of file fad.h.

◆ val_

template<class T>
T Fad< T >::val_
protected

Definition at line 71 of file fad.h.


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