Stan Math Library  2.15.0
reverse mode automatic differentiation
Public Types | Public Member Functions | Public Attributes | List of all members
stan::math::cholesky_block Class Reference

#include <cholesky_decompose.hpp>

Inheritance diagram for stan::math::cholesky_block:
stan::math::vari

Public Types

typedef Eigen::Block< Eigen::MatrixXd > Block_
 

Public Member Functions

 cholesky_block (const Eigen::Matrix< var, -1, -1 > &A, const Eigen::Matrix< double, -1, -1 > &L_A)
 Constructor for cholesky function. More...
 
void symbolic_rev (Block_ &L, Block_ &Lbar)
 Symbolic adjoint calculation for cholesky factor A. More...
 
virtual void chain ()
 Reverse mode differentiation algorithm refernce: 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

int M_
 
int block_size_
 
vari ** variRefA_
 
vari ** variRefL_
 
- 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

Definition at line 19 of file cholesky_decompose.hpp.

Member Typedef Documentation

§ Block_

typedef Eigen::Block<Eigen::MatrixXd> stan::math::cholesky_block::Block_

Definition at line 23 of file cholesky_decompose.hpp.

Constructor & Destructor Documentation

§ cholesky_block()

stan::math::cholesky_block::cholesky_block ( const Eigen::Matrix< var, -1, -1 > &  A,
const Eigen::Matrix< double, -1, -1 > &  L_A 
)
inline

Constructor for cholesky function.

Stores varis for A. Instantiates and stores varis for L. Instantiates and stores dummy vari for upper triangular part of var result returned in cholesky_decompose function call

variRefL aren't on the chainable autodiff stack, only used for storage and computation. Note that varis for L are constructed externally in cholesky_decompose.

block_size_ determined using the same calculation Eigen/LLT.h

Parameters
Amatrix
L_Amatrix, cholesky factor of A

Definition at line 43 of file cholesky_decompose.hpp.

Member Function Documentation

§ chain()

virtual void stan::math::cholesky_block::chain ( )
inlinevirtual

Reverse mode differentiation algorithm refernce:

Iain Murray: Differentiation of the Cholesky decomposition, 2016.

Reimplemented from stan::math::vari.

Definition at line 87 of file cholesky_decompose.hpp.

§ symbolic_rev()

void stan::math::cholesky_block::symbolic_rev ( Block_ L,
Block_ Lbar 
)
inline

Symbolic adjoint calculation for cholesky factor A.

Parameters
Lcholesky factor
Lbarmatrix of adjoints of L

Definition at line 68 of file cholesky_decompose.hpp.

Member Data Documentation

§ block_size_

int stan::math::cholesky_block::block_size_

Definition at line 22 of file cholesky_decompose.hpp.

§ M_

int stan::math::cholesky_block::M_

Definition at line 21 of file cholesky_decompose.hpp.

§ variRefA_

vari** stan::math::cholesky_block::variRefA_

Definition at line 24 of file cholesky_decompose.hpp.

§ variRefL_

vari** stan::math::cholesky_block::variRefL_

Definition at line 25 of file cholesky_decompose.hpp.


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

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