Skip to content

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 wherever std::complex is used.
  • XAD/StdCompatibility.hpp - This header imports the XAD math functions into the std namespace, for compatibility reasons. It enables using constructs like std::sin(x) where x is an XAD type. Additionally, it also specialises std::numeric_limits for the XAD data types, so that it provides traits similar to the standard floating point types.