![]() |
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... | |
stan::math::var | value (double value) |
Returns a T_return_type with the value specified with the partial derivatves. More... | |
Public Attributes | |
size_t | nvaris |
vari ** | all_varis |
double * | all_partials |
VectorView< double, is_vector< T1 >::value, is_constant_struct< T1 >::value > | d_x1 |
VectorView< double, is_vector< T2 >::value, is_constant_struct< T2 >::value > | d_x2 |
VectorView< double, is_vector< T3 >::value, is_constant_struct< T3 >::value > | d_x3 |
VectorView< double, is_vector< T4 >::value, is_constant_struct< T4 >::value > | d_x4 |
VectorView< double, is_vector< T5 >::value, is_constant_struct< T5 >::value > | d_x5 |
VectorView< double, is_vector< T6 >::value, is_constant_struct< T6 >::value > | 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.
This is the partial template specialization for when the return type is stan::math::var.
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 91 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 125 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 185 of file OperandsAndPartials.hpp.
double* stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::all_partials |
Definition at line 94 of file OperandsAndPartials.hpp.
vari** stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::all_varis |
Definition at line 93 of file OperandsAndPartials.hpp.
VectorView<double, is_vector<T1>::value, is_constant_struct<T1>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::d_x1 |
Definition at line 98 of file OperandsAndPartials.hpp.
VectorView<double, is_vector<T2>::value, is_constant_struct<T2>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::d_x2 |
Definition at line 101 of file OperandsAndPartials.hpp.
VectorView<double, is_vector<T3>::value, is_constant_struct<T3>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::d_x3 |
Definition at line 104 of file OperandsAndPartials.hpp.
VectorView<double, is_vector<T4>::value, is_constant_struct<T4>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::d_x4 |
Definition at line 107 of file OperandsAndPartials.hpp.
VectorView<double, is_vector<T5>::value, is_constant_struct<T5>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::d_x5 |
Definition at line 110 of file OperandsAndPartials.hpp.
VectorView<double, is_vector<T6>::value, is_constant_struct<T6>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::d_x6 |
Definition at line 113 of file OperandsAndPartials.hpp.
size_t stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, stan::math::var >::nvaris |
Definition at line 92 of file OperandsAndPartials.hpp.