Belle II Software development
DualNumber Struct Reference

Simple structure implementing dual numbers which are used for exact evaluation of the derivatives, see https://en.wikipedia.org/wiki/Automatic_differentiation#Automatic_differentiation_using_dual_numbers. More...

#include <beamHelpers.h>

Public Member Functions

 DualNumber (double X, double dX)
 constructor allowing to set the values
 
 DualNumber ()
 constructor setting values to zero
 

Public Attributes

double x
 nominal value of dual number
 
double dx
 differential value of dual number, should be 1 if derivative is calculated
 

Detailed Description

Simple structure implementing dual numbers which are used for exact evaluation of the derivatives, see https://en.wikipedia.org/wiki/Automatic_differentiation#Automatic_differentiation_using_dual_numbers.

Definition at line 38 of file beamHelpers.h.

Constructor & Destructor Documentation

◆ DualNumber() [1/2]

DualNumber ( double  X,
double  dX 
)
inline

constructor allowing to set the values

Definition at line 43 of file beamHelpers.h.

43: x(X), dx(dX) {}
double dx
differential value of dual number, should be 1 if derivative is calculated
Definition: beamHelpers.h:40
double x
nominal value of dual number
Definition: beamHelpers.h:39

◆ DualNumber() [2/2]

DualNumber ( )
inline

constructor setting values to zero

Definition at line 46 of file beamHelpers.h.

46: x(0), dx(0) {}

Member Data Documentation

◆ dx

double dx

differential value of dual number, should be 1 if derivative is calculated

Definition at line 40 of file beamHelpers.h.

◆ x

double x

nominal value of dual number

Definition at line 39 of file beamHelpers.h.


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