![]() |
Stan Math Library
2.20.0
reverse mode automatic differentiation
|
#include <dot_product.hpp>
Public Member Functions | |
dot_product_vari (typename dot_product_store_type< T1 >::type v1, typename dot_product_store_type< T2 >::type v2, size_t length) | |
dot_product_vari (const T1 *v1, const T2 *v2, size_t length, dot_product_vari< T1, T2 > *shared_v1=NULL, dot_product_vari< T1, T2 > *shared_v2=NULL) | |
template<typename Derived1 , typename Derived2 > | |
dot_product_vari (const Eigen::DenseBase< Derived1 > &v1, const Eigen::DenseBase< Derived2 > &v2, dot_product_vari< T1, T2 > *shared_v1=NULL, dot_product_vari< T1, T2 > *shared_v2=NULL) | |
template<int R1, int C1, int R2, int C2> | |
dot_product_vari (const Eigen::Matrix< T1, R1, C1 > &v1, const Eigen::Matrix< T2, R2, C2 > &v2, dot_product_vari< T1, T2 > *shared_v1=NULL, dot_product_vari< T1, T2 > *shared_v2=NULL) | |
virtual void | chain () |
Apply the chain rule to this variable based on the variables on which it depends. More... | |
![]() | |
vari (double x) | |
Construct a variable implementation from a value. More... | |
vari (double x, bool stacked) | |
virtual | ~vari () |
Throw an illegal argument exception. More... | |
void | init_dependent () |
Initialize the adjoint for this (dependent) variable to 1. More... | |
void | set_zero_adjoint () |
Set the adjoint value of this variable to 0. More... | |
Protected Member Functions | |
void | chain (vari **v1, vari **v2) |
void | chain (double *v1, vari **v2) |
void | chain (vari **v1, double *v2) |
void | initialize (vari **&mem_v, const var *inv, vari **shared=nullptr) |
template<typename Derived > | |
void | initialize (vari **&mem_v, const Eigen::DenseBase< Derived > &inv, vari **shared=nullptr) |
void | initialize (double *&mem_d, const double *ind, double *shared=nullptr) |
template<typename Derived > | |
void | initialize (double *&mem_d, const Eigen::DenseBase< Derived > &ind, double *shared=nullptr) |
Static Protected Member Functions | |
static double | var_dot (vari **v1, vari **v2, size_t length) |
static double | var_dot (const T1 *v1, const T2 *v2, size_t length) |
template<typename Derived1 , typename Derived2 > | |
static double | var_dot (const Eigen::DenseBase< Derived1 > &v1, const Eigen::DenseBase< Derived2 > &v2) |
Protected Attributes | |
dot_product_store_type< T1 >::type | v1_ |
dot_product_store_type< T2 >::type | v2_ |
size_t | length_ |
Additional Inherited Members | |
![]() | |
static void * | operator new (size_t nbytes) |
Allocate memory from the underlying memory pool. More... | |
static void | operator delete (void *) |
Delete a pointer from the underlying memory pool. More... | |
![]() | |
const double | val_ |
The value of this variable. More... | |
double | adj_ |
The adjoint of this variable, which is the partial derivative of this variable with respect to the root variable. More... | |
Definition at line 32 of file dot_product.hpp.
|
inline |
Definition at line 131 of file dot_product.hpp.
|
inline |
Definition at line 135 of file dot_product.hpp.
|
inline |
Definition at line 151 of file dot_product.hpp.
|
inline |
Definition at line 168 of file dot_product.hpp.
|
inlineprotected |
Definition at line 66 of file dot_product.hpp.
|
inlineprotected |
Definition at line 72 of file dot_product.hpp.
|
inlineprotected |
Definition at line 77 of file dot_product.hpp.
|
inlinevirtual |
Apply the chain rule to this variable based on the variables on which it depends.
The base implementation in this class is a no-op.
Reimplemented from stan::math::vari.
Definition at line 184 of file dot_product.hpp.
|
inlineprotected |
Definition at line 82 of file dot_product.hpp.
|
inlineprotected |
Definition at line 94 of file dot_product.hpp.
|
inlineprotected |
Definition at line 106 of file dot_product.hpp.
|
inlineprotected |
Definition at line 118 of file dot_product.hpp.
|
inlinestaticprotected |
Definition at line 38 of file dot_product.hpp.
|
inlinestaticprotected |
Definition at line 47 of file dot_product.hpp.
|
inlinestaticprotected |
Definition at line 57 of file dot_product.hpp.
|
protected |
Definition at line 36 of file dot_product.hpp.
|
protected |
Definition at line 34 of file dot_product.hpp.
|
protected |
Definition at line 35 of file dot_product.hpp.