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 two 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.