#include <pos_def.hpp>
|
| Transformer (size_t rows, size_t, constraint_t=constraint_t()) |
|
void | transform () |
|
void | inv_transform (size_t refcnt) |
|
template<class CurrPtrPack , class PtrPack > |
auto | inv_transform_ad (const CurrPtrPack &curr_pack, const PtrPack &, size_t refcnt) const |
|
template<class CurrPtrPack , class PtrPack > |
auto | logj_inv_transform_ad (const CurrPtrPack &curr_pack, const PtrPack &) const |
|
template<class GenType , class ContDist > |
void | init (GenType &, ContDist &) |
|
void | activate_refcnt (size_t) const |
|
var_t & | get_c () |
|
const var_t & | get_c () const |
|
constexpr size_t | size_uc () const |
|
constexpr size_t | rows_uc () const |
|
constexpr size_t | cols_uc () const |
|
constexpr size_t | size_c () const |
|
constexpr size_t | rows_c () const |
|
constexpr size_t | cols_c () const |
|
constexpr size_t | bind_size_uc () const |
|
constexpr size_t | bind_size_c () const |
|
constexpr size_t | bind_size_v () const |
|
template<class CurrPtrPack , class PtrPack > |
void | bind (const CurrPtrPack &curr_pack, const PtrPack &) |
|
◆ constraint_t
template<class ValueType >
◆ shape_t
template<class ValueType >
◆ uc_view_t
template<class ValueType >
◆ value_t
template<class ValueType >
◆ var_t
template<class ValueType >
◆ view_t
template<class ValueType >
◆ Transformer()
template<class ValueType >
Constructs a Transformer object. It represents a positive-definite matrix, and hence ignores cols (second parameter) and treats rows as both rows and cols.
- Parameters
-
rows | number of constrained rows (and cols) |
◆ activate_refcnt()
template<class ValueType >
◆ bind()
template<class ValueType >
template<class CurrPtrPack , class PtrPack >
Binds unconstrained viewer to unconstrained region (viewed as a vector), constrained viewer to constrained region (viewed as a matrix), and internal visit count to visit count region.
◆ bind_size_c()
template<class ValueType >
◆ bind_size_uc()
template<class ValueType >
Returns the number of elements required to bind and compute unconstrained, constrained parameters and visit count.
◆ bind_size_v()
template<class ValueType >
◆ cols_c()
template<class ValueType >
◆ cols_uc()
template<class ValueType >
◆ get_c() [1/2]
template<class ValueType >
◆ get_c() [2/2]
template<class ValueType >
◆ init()
template<class ValueType >
template<class GenType , class ContDist >
Initializes unconstrained values such that constrained (pos-def) matrix is identity. This is equivalent to simply setting the unconstrained values to 0, since diagonal is first exponentiated and the Cholesky decomposition of identity is identity.
◆ inv_transform()
template<class ValueType >
Inverse transforms from unconstrained parameters to constrained parameters. Only the first visitor of the visit count will invoke the actual transformation. The reference count is used to reset the visit count if the visit count has reached refcnt.
- Returns
- viewer of constrained parameters
◆ inv_transform_ad()
template<class ValueType >
template<class CurrPtrPack , class PtrPack >
Inverse transform from unconstrained parameters to constrained parameters. This should not have any memory dependency through calling bind. It is expected that uc and c are vector-like in the sense that either row or column is 1. In debug mode, we check that uc and c have correct sizes.
- Parameters
-
uc | vector of unconstrained parameters to transform |
c | vector of constrained parameters to populate Creates an AD expression representing the inverse transform. User must ensure that this gets called exactly refcnt number of times. |
uc_val | beginning of unconstrained parameter values |
uc_adj | beginning of unconstrained parameter adjoints |
c_val | beginning of constrained value region. The first size_c() elements will be used as temporary region to compute a lower-triangular matrix. |
v_val | beginning of visit count |
refcnt | total reference count to determine when to loop visit count back to 0 |
◆ logj_inv_transform_ad()
template<class ValueType >
template<class CurrPtrPack , class PtrPack >
Creates an AD expression representing the log-jacobian of inverse transform. In general, this may need to reuse computed values from inverse transform. User must guarantee that inverse transform AD expression that is bound to the same resources as the return value of this function is evaluated before.
◆ rows_c()
template<class ValueType >
◆ rows_uc()
template<class ValueType >
◆ size_c()
template<class ValueType >
◆ size_uc()
template<class ValueType >
Returns the dimension information for the viewers of unconstrained and constrained parameters.
◆ transform()
template<class ValueType >
The documentation for this struct was generated from the following file: