| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type > Struct Template Reference

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

## Detailed Description

### template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>
struct stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >

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.

Template Parameters

  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 37 of file OperandsAndPartials.hpp.

## Constructor & Destructor Documentation

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::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`
| ) |  |
| inline

Constructor.

Parameters

  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 55 of file OperandsAndPartials.hpp.

## Member Function Documentation

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

T_return_type stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::value | ( | double | value | ) |
| inline

Returns a T_return_type with the value specified with the partial derivatves.

Parameters

  [in] | value | Value of the variable

Returns
  a variable with the appropriate value

Definition at line 67 of file OperandsAndPartials.hpp.

## Member Data Documentation

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x1

Definition at line 38 of file OperandsAndPartials.hpp.

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x2

Definition at line 39 of file OperandsAndPartials.hpp.

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x3

Definition at line 40 of file OperandsAndPartials.hpp.

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x4

Definition at line 41 of file OperandsAndPartials.hpp.

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x5

Definition at line 42 of file OperandsAndPartials.hpp.

template<typename T1 = double, typename T2 = double, typename T3 = double, typename T4 = double, typename T5 = double, typename T6 = double, typename T_return_type = typename stan::return_type<T1, T2, T3, T4, T5, T6>::type>

VectorView<T_return_type, false, true> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, T_return_type >::d_x6

Definition at line 43 of file OperandsAndPartials.hpp.

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

- stan/math/prim/scal/meta/OperandsAndPartials.hpp

[ Stan Home Page ] © 2011–2016, Stan Development Team.