Headers and Namespaces¶
All XAD data types and operations are defined in the xad
namespace. For brevity, this namespace has been omitted in the reference section.
XAD provides a general header XAD/XAD.hpp
, which includes all headers that are commonly needed to work with XAD. Typically, this is all that clients need to include.
There are four additional headers provided that can be included on demand:
XAD/Complex.hpp
- For using complex numbers with XAD data types (see Complex). This header should be included whereverstd::complex
is used.XAD/StdCompatibility.hpp
- This header imports the XAD math functions into thestd
namespace, for compatibility reasons. It enables using constructs likestd::sin(x)
wherex
is an XAD type. Additionally, it also specialisesstd::numeric_limits
for the XAD data types, so that it provides traits similar to the standard floating point types.XAD/Hessian.hpp
- Imports methods for computing the Hessian matrix of a single output function into thexad
namespace.XAD/Jacobian.hpp
- Imports methods for computing the Jacobian matrix of a function with multiple inputs and multiple outputs into thexad
namespace.