![]() |
Stan Math Library
2.15.0
reverse mode automatic differentiation
|
#include <cholesky_decompose.hpp>
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... | |
![]() | |
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_ |
![]() | |
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 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... | |
Definition at line 19 of file cholesky_decompose.hpp.
typedef Eigen::Block<Eigen::MatrixXd> stan::math::cholesky_block::Block_ |
Definition at line 23 of file cholesky_decompose.hpp.
|
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
A | matrix |
L_A | matrix, cholesky factor of A |
Definition at line 43 of file cholesky_decompose.hpp.
|
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 adjoint calculation for cholesky factor A.
L | cholesky factor |
Lbar | matrix of adjoints of L |
Definition at line 68 of file cholesky_decompose.hpp.
int stan::math::cholesky_block::block_size_ |
Definition at line 22 of file cholesky_decompose.hpp.
int stan::math::cholesky_block::M_ |
Definition at line 21 of file cholesky_decompose.hpp.
vari** stan::math::cholesky_block::variRefA_ |
Definition at line 24 of file cholesky_decompose.hpp.
vari** stan::math::cholesky_block::variRefL_ |
Definition at line 25 of file cholesky_decompose.hpp.