stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > > Struct Template Reference

This class builds partial derivatives with respect to a set of operands. More...

`#include <OperandsAndPartials.hpp>`

## Public Types

typedef fvar< T_partials_return > | T_return_type

## 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)
T_return_type | value (T_partials_return value)
| ~OperandsAndPartials ()

## Public Attributes

const T1 & | x1_
const T2 & | x2_
const T3 & | x3_
const T4 & | x4_
const T5 & | x5_
const T6 & | x6_
size_t | n_partials
T_partials_return * | all_partials
VectorView< T_partials_return, is_vector< T1 >::value, is_constant_struct< T1 >::value > | d_x1
VectorView< T_partials_return, is_vector< T2 >::value, is_constant_struct< T2 >::value > | d_x2
VectorView< T_partials_return, is_vector< T3 >::value, is_constant_struct< T3 >::value > | d_x3
VectorView< T_partials_return, is_vector< T4 >::value, is_constant_struct< T4 >::value > | d_x4
VectorView< T_partials_return, is_vector< T5 >::value, is_constant_struct< T5 >::value > | d_x5
VectorView< T_partials_return, is_vector< T6 >::value, is_constant_struct< T6 >::value > | d_x6

## Detailed Description

### template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T_partials_return>
struct stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >

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 fvar<T>.

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

## Member Typedef Documentation

## T_return_type

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

typedef fvar<T_partials_return> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::T_return_type

Definition at line 103 of file OperandsAndPartials.hpp.

## Constructor & Destructor Documentation

## OperandsAndPartials()

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::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

Definition at line 134 of file OperandsAndPartials.hpp.

## ~OperandsAndPartials()

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::~OperandsAndPartials | ( |  | ) |

inline

Definition at line 176 of file OperandsAndPartials.hpp.

## Member Function Documentation

## value()

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

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

inline

Definition at line 169 of file OperandsAndPartials.hpp.

## Member Data Documentation

## all_partials

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

T_partials_return* stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::all_partials

Definition at line 113 of file OperandsAndPartials.hpp.

## d_x1

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

VectorView<T_partials_return, is_vector<T1>::value, is_constant_struct<T1>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::d_x1

Definition at line 117 of file OperandsAndPartials.hpp.

## d_x2

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

VectorView<T_partials_return, is_vector<T2>::value, is_constant_struct<T2>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::d_x2

Definition at line 120 of file OperandsAndPartials.hpp.

## d_x3

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

VectorView<T_partials_return, is_vector<T3>::value, is_constant_struct<T3>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::d_x3

Definition at line 123 of file OperandsAndPartials.hpp.

## d_x4

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

VectorView<T_partials_return, is_vector<T4>::value, is_constant_struct<T4>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::d_x4

Definition at line 126 of file OperandsAndPartials.hpp.

## d_x5

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

VectorView<T_partials_return, is_vector<T5>::value, is_constant_struct<T5>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::d_x5

Definition at line 129 of file OperandsAndPartials.hpp.

## d_x6

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

VectorView<T_partials_return, is_vector<T6>::value, is_constant_struct<T6>::value> stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::d_x6

Definition at line 132 of file OperandsAndPartials.hpp.

## n_partials

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

size_t stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::n_partials

Definition at line 112 of file OperandsAndPartials.hpp.

## x1_

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

const T1& stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::x1_

Definition at line 105 of file OperandsAndPartials.hpp.

## x2_

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

const T2& stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::x2_

Definition at line 106 of file OperandsAndPartials.hpp.

## x3_

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

const T3& stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::x3_

Definition at line 107 of file OperandsAndPartials.hpp.

## x4_

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

const T4& stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::x4_

Definition at line 108 of file OperandsAndPartials.hpp.

## x5_

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

const T5& stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::x5_

Definition at line 109 of file OperandsAndPartials.hpp.

## x6_

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T_partials_return >

const T6& stan::math::OperandsAndPartials< T1, T2, T3, T4, T5, T6, fvar< T_partials_return > >::x6_

Definition at line 110 of file OperandsAndPartials.hpp.

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

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

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