Stan Math Library  2.15.0
reverse mode automatic differentiation
Public Member Functions | Public Attributes | List of all members
stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l > Class Template Reference

This is a subclass of the vari class for precomputed gradients of cov_exp_quad. More...

#include <cov_exp_quad.hpp>

Inheritance diagram for stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >:
stan::math::vari

Public Member Functions

 cov_exp_quad_vari (const std::vector< T_x > &x, const T_sigma &sigma, const T_l &l)
 Constructor for cov_exp_quad. More...
 
virtual void chain ()
 Apply the chain rule to this variable based on the variables on which it depends. More...
 
- Public Member Functions inherited from stan::math::vari
 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...
 

Public Attributes

const size_t size_
 
const size_t size_ltri_
 
const double l_d_
 
const double sigma_d_
 
const double sigma_sq_d_
 
double * dist_
 
varil_vari_
 
varisigma_vari_
 
vari ** cov_lower_
 
vari ** cov_diag_
 
- Public Attributes inherited from stan::math::vari
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from stan::math::vari
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...
 

Detailed Description

template<typename T_x, typename T_sigma, typename T_l>
class stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >

This is a subclass of the vari class for precomputed gradients of cov_exp_quad.

The class stores the double values for the distance matrix, pointers to the varis for the covariance matrix, along with a pointer to the vari for sigma, and the vari for l.

Template Parameters
T_xtype of std::vector of elements
T_sigmatype of sigma
T_ltype of length scale

Definition at line 36 of file cov_exp_quad.hpp.

Constructor & Destructor Documentation

§ cov_exp_quad_vari()

template<typename T_x, typename T_sigma, typename T_l>
stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::cov_exp_quad_vari ( const std::vector< T_x > &  x,
const T_sigma &  sigma,
const T_l &  l 
)
inline

Constructor for cov_exp_quad.

All memory allocated in ChainableStack's stack_alloc arena.

It is critical for the efficiency of this object that the constructor create new varis that aren't popped onto the var_stack_, but rather are popped onto the var_nochain_stack_. This is controlled to the second argument to vari's constructor.

Parameters
xstd::vector input that can be used in square distance Assumes each element of x is the same size
sigmastandard deviation
llength scale

Definition at line 67 of file cov_exp_quad.hpp.

Member Function Documentation

§ chain()

template<typename T_x, typename T_sigma, typename T_l>
virtual void stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::chain ( )
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 95 of file cov_exp_quad.hpp.

Member Data Documentation

§ cov_diag_

template<typename T_x, typename T_sigma, typename T_l>
vari** stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::cov_diag_

Definition at line 47 of file cov_exp_quad.hpp.

§ cov_lower_

template<typename T_x, typename T_sigma, typename T_l>
vari** stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::cov_lower_

Definition at line 46 of file cov_exp_quad.hpp.

§ dist_

template<typename T_x, typename T_sigma, typename T_l>
double* stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::dist_

Definition at line 43 of file cov_exp_quad.hpp.

§ l_d_

template<typename T_x, typename T_sigma, typename T_l>
const double stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::l_d_

Definition at line 40 of file cov_exp_quad.hpp.

§ l_vari_

template<typename T_x, typename T_sigma, typename T_l>
vari* stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::l_vari_

Definition at line 44 of file cov_exp_quad.hpp.

§ sigma_d_

template<typename T_x, typename T_sigma, typename T_l>
const double stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::sigma_d_

Definition at line 41 of file cov_exp_quad.hpp.

§ sigma_sq_d_

template<typename T_x, typename T_sigma, typename T_l>
const double stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::sigma_sq_d_

Definition at line 42 of file cov_exp_quad.hpp.

§ sigma_vari_

template<typename T_x, typename T_sigma, typename T_l>
vari* stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::sigma_vari_

Definition at line 45 of file cov_exp_quad.hpp.

§ size_

template<typename T_x, typename T_sigma, typename T_l>
const size_t stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::size_

Definition at line 38 of file cov_exp_quad.hpp.

§ size_ltri_

template<typename T_x, typename T_sigma, typename T_l>
const size_t stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::size_ltri_

Definition at line 39 of file cov_exp_quad.hpp.


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

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