![]() |
Stan Math Library
2.10.0
reverse mode automatic differentiation
|
This class builds partial derivatives with respect to a set of operands. More...
#include <OperandsAndPartials.hpp>
Public Member Functions | |
OperandsAndPartials (const T1 &x1=0, const T2 &x2=0, const T3 &x3=0, const T4 &x4=0, const T5 &x5=0, const T6 &x6=0) | |
Constructor. More... | |
T_return_type | value (double value) |
Returns a T_return_type with the value specified with the partial derivatves. More... | |
Public Attributes | |
VectorView< T_return_type, false, true > | d_x1 |
VectorView< T_return_type, false, true > | d_x2 |
VectorView< T_return_type, false, true > | d_x3 |
VectorView< T_return_type, false, true > | d_x4 |
VectorView< T_return_type, false, true > | d_x5 |
VectorView< T_return_type, false, true > | d_x6 |
This class builds partial derivatives with respect to a set of operands.
There are two reason for the generality of this class. The first is to handle vector and scalar arguments without needing to write additional code. The second is to use this class for writing probability distributions that handle primitives, reverse mode, and forward mode variables seamlessly.
The default template class handles the case where the arguments are primitive. There are template specializations for reverse mode and forward mode.
T1 | First set of operands. |
T2 | Second set of operands. |
T3 | Third set of operands. |
T4 | Fourth set of operands. |
T5 | Fifth set of operands. |
T6 | Sixth set of operands. |
T_return_type | Return type of the expression. This defaults to a template metaprogram that calculates the scalar promotion of T1 – T6. |
Definition at line 38 of file OperandsAndPartials.hpp.
|
inline |
Constructor.
x1 | first set of operands |
x2 | second set of operands |
x3 | third set of operands |
x4 | fourth set of operands |
x5 | fifth set of operands |
x6 | sixth set of operands |
Definition at line 56 of file OperandsAndPartials.hpp.
|
inline |
Returns a T_return_type with the value specified with the partial derivatves.
[in] | value | Value of the variable |
Definition at line 68 of file OperandsAndPartials.hpp.
VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x1 |
Definition at line 39 of file OperandsAndPartials.hpp.
VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x2 |
Definition at line 40 of file OperandsAndPartials.hpp.
VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x3 |
Definition at line 41 of file OperandsAndPartials.hpp.
VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x4 |
Definition at line 42 of file OperandsAndPartials.hpp.
VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x5 |
Definition at line 43 of file OperandsAndPartials.hpp.
VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x6 |
Definition at line 44 of file OperandsAndPartials.hpp.