NGSolve  4.9
Public Types | Public Member Functions
ngstd::AutoDiff< D, SCAL > Class Template Reference

Datatype for automatic differentiation. More...

#include <autodiff.hpp>

List of all members.

Public Types

typedef AutoDiff< D, SCAL > TELEM
typedef SCAL TSCAL

Public Member Functions

ALWAYS_INLINE AutoDiff () throw ()
 elements are undefined
ALWAYS_INLINE AutoDiff (const AutoDiff &ad2) throw ()
 copy constructor
ALWAYS_INLINE AutoDiff (SCAL aval) throw ()
 initial object with constant value
ALWAYS_INLINE AutoDiff (SCAL aval, int diffindex) throw ()
 init object with (val, e_diffindex)
ALWAYS_INLINE AutoDiffoperator= (SCAL aval) throw ()
 assign constant value
SCAL Value () const throw ()
 returns value
SCAL DValue (int i) const throw ()
 returns partial derivative
SCAL & Value () throw ()
 access value
SCAL & DValue (int i) throw ()
 accesses partial derivative
ALWAYS_INLINE AutoDiff< D, SCAL > & operator+= (const SCAL &y) throw ()
ALWAYS_INLINE AutoDiff< D, SCAL > & operator+= (const AutoDiff< D, SCAL > &y) throw ()
ALWAYS_INLINE AutoDiff< D, SCAL > & operator-= (const AutoDiff< D, SCAL > &y) throw ()
ALWAYS_INLINE AutoDiff< D, SCAL > & operator*= (const AutoDiff< D, SCAL > &y) throw ()
ALWAYS_INLINE AutoDiff< D, SCAL > & operator*= (const SCAL &y) throw ()
ALWAYS_INLINE AutoDiff< D, SCAL > & operator/= (const SCAL &y) throw ()
ALWAYS_INLINE bool operator== (SCAL val2) throw ()
bool operator!= (SCAL val2) throw ()
bool operator< (SCAL val2) throw ()
bool operator> (SCAL val2) throw ()

Detailed Description

template<int D, typename SCAL = double>
class ngstd::AutoDiff< D, SCAL >

Datatype for automatic differentiation.

Contains function value and D derivatives. Algebraic operations are overloaded by using product-rule etc. etc.


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