NGSolve 5.3
|
Datatype for automatic differentiation. More...
#include <autodiffdiff.hpp>
Public Types | |
typedef AutoDiffDiff< D, SCAL > | TELEM |
Public Member Functions | |
AutoDiffDiff () throw () | |
elements are undefined | |
AutoDiffDiff (const AutoDiffDiff &ad2) throw () | |
copy constructor | |
AutoDiffDiff (SCAL aval) throw () | |
initial object with constant value | |
AutoDiffDiff (const AutoDiff< D, SCAL > &ad2) throw () | |
initial object with value and derivative | |
AutoDiffDiff (SCAL aval, int diffindex) throw () | |
init object with (val, e_diffindex) | |
INLINE | AutoDiffDiff (SCAL aval, const SCAL *grad) |
INLINE | AutoDiffDiff (SCAL aval, const SCAL *grad, const SCAL *hesse) |
AutoDiffDiff & | operator= (SCAL aval) throw () |
assign constant value | |
INLINE void | StoreGradient (SCAL *p) const |
INLINE void | LoadGradient (const SCAL *p) |
INLINE void | StoreHessian (SCAL *p) const |
INLINE void | LoadHessian (const SCAL *p) |
SCAL | Value () const throw () |
returns value | |
SCAL | DValue (int i) const throw () |
returns partial derivative | |
AutoDiff< D, SCAL > | DValueAD (int i) const |
SCAL | DDValue (int i) const throw () |
returns partial derivative | |
SCAL | DDValue (int i, int j) const throw () |
returns partial derivative | |
SCAL & | Value () throw () |
access value | |
SCAL & | DValue (int i) throw () |
accesses partial derivative | |
SCAL & | DDValue (int i) throw () |
accesses partial derivative | |
SCAL & | DDValue (int i, int j) throw () |
accesses partial derivative | |
operator AutoDiff< D, SCAL > () const | |
AutoDiffDiff< D, SCAL > & | operator+= (const AutoDiffDiff< D, SCAL > &y) throw () |
add autodiffdiff object | |
AutoDiffDiff< D, SCAL > & | operator-= (const AutoDiffDiff< D, SCAL > &y) throw () |
subtract autodiffdiff object | |
AutoDiffDiff< D, SCAL > & | operator*= (const AutoDiffDiff< D, SCAL > &y) throw () |
multiply with autodiffdiff object | |
AutoDiffDiff< D, SCAL > & | operator*= (const SCAL &y) throw () |
multiply with scalar | |
AutoDiffDiff< D, SCAL > & | operator/= (const SCAL &y) throw () |
divide by scalar | |
bool | operator== (SCAL val2) throw () |
same value | |
bool | operator!= (SCAL val2) throw () |
different values | |
bool | operator< (SCAL val2) throw () |
less | |
bool | operator> (SCAL val2) throw () |
greater | |
Datatype for automatic differentiation.
Contains function value, D first derivatives, and D*D second derivatives. Algebraic operations are overloaded by using product-rule etc. etc.