Public Types | Static Public Member Functions | List of all members
Eigen::NumTraits< stan::math::fvar< T > > Struct Template Reference

#include "stan/math/fwd/mat/fun/Eigen_NumTraits.hpp"

Inheritance diagram for Eigen::NumTraits< stan::math::fvar< T > >:

Public Types

enum  { RequireInitialization = 1, ReadCost = 2 * NumTraits<double>::ReadCost, AddCost = 2 * NumTraits<T>::AddCost, MulCost = 3 * NumTraits<T>::MulCost + NumTraits<T>::AddCost }
 

Static Public Member Functions

static int digits10 ()
 

Detailed Description

template<typename T>
struct Eigen::NumTraits< stan::math::fvar< T > >

Numerical traits template override for Eigen for automatic gradient variables.

Definition at line 16 of file Eigen_NumTraits.hpp.

Member Enumeration Documentation

template<typename T >
anonymous enum
Enumerator
RequireInitialization 

stan::math::fvar requires initialization

ReadCost 

twice the cost to copy a double

AddCost 

2 * AddCost
(a + b) = a + b
(a + b)' = a' + b'

MulCost 

3 * MulCost + AddCost
(a * b) = a * b
(a * b)' = a' * b + a * b'

Definition at line 18 of file Eigen_NumTraits.hpp.

18  {
19  /**
20  * stan::math::fvar requires initialization
21  */
23 
24  /**
25  * twice the cost to copy a double
26  */
27  ReadCost = 2 * NumTraits<double>::ReadCost,
28 
29  /**
30  * 2 * AddCost
31  * <br>
32  * (a + b) = a + b
33  * <br>
34  * (a + b)' = a' + b'
35  */
36  AddCost = 2 * NumTraits<T>::AddCost,
37 
38  /**
39  * 3 * MulCost + AddCost
40  * <br>
41  * (a * b) = a * b
42  * <br>
43  * (a * b)' = a' * b + a * b'
44  */
45  MulCost = 3 * NumTraits<T>::MulCost + NumTraits<T>::AddCost
46  };

Member Function Documentation

template<typename T >
static int Eigen::NumTraits< stan::math::fvar< T > >::digits10 ( )
inlinestatic

Return the number of decimal digits that can be represented without change. Delegates to std::numeric_limits<double>::digits10().

Definition at line 53 of file Eigen_NumTraits.hpp.

53 { return std::numeric_limits<double>::digits10; }

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