TMB Documentation  v1.9.11
Public Member Functions | List of all members
newton::jacobian_sparse_plus_lowrank_t< dummy > Struct Template Reference

Methods specific for a sparse plus low rank hessian. More...

#include <newton.hpp>

Public Member Functions

matrix< TMBad::Scalar > llt_solve (const sparse_plus_lowrank< TMBad::Scalar > &h, const matrix< TMBad::Scalar > &x)
 

Detailed Description

template<class dummy = void>
struct newton::jacobian_sparse_plus_lowrank_t< dummy >

Methods specific for a sparse plus low rank hessian.

Represents a positive definite matrix of the form

H + G * H0 * G^T

where

To detect this structure one must use the Tag() function to select k intermediate variables which will be used to decompose the computational graph.

Formulas

The following formulas are applied internally to perform the solve (Woodbury matrix identity) and determinant (Matrix determinant lemma).

Solve

W = solve(H, G)
M = solve(H0) + G^T * W
solve(H + G * H0 * G^T) = solve(H) - W * solve(M) * W^T

determinant

det(H + G * H0 * G^T) = det(H) * det(H0) * det(M)

However, we use the substitution H0M := H0 * M for numerical robustness. These formulas are valid even when H0 = 0:

Solve

W <- solve(H, G)
H0M = I + H0 * t(G) * W
solve(H + G * H0 * G^T) = solve(H) - W * solve(H0M) * H0 * t(W)

Determinant

det(H + G * H0 * G^T) = det(H) * det(H0M)

Definition at line 457 of file newton.hpp.

Member Function Documentation

§ llt_solve()

template<class dummy = void>
matrix<TMBad::Scalar> newton::jacobian_sparse_plus_lowrank_t< dummy >::llt_solve ( const sparse_plus_lowrank< TMBad::Scalar > &  h,
const matrix< TMBad::Scalar > &  x 
)
inline
Note
Optional: This method allows the assumption that a prior call to llt_factorize has been performed for the same H

Definition at line 562 of file newton.hpp.


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