Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ cov_matrix_constrain() [5/5]

template<typename T , require_var_vector_t< T > * = nullptr>
var_value< Eigen::MatrixXd > stan::math::cov_matrix_constrain ( const T &  x,
Eigen::Index  K,
scalar_type_t< T > &  lp 
)

Return the symmetric, positive-definite matrix of dimensions K by K resulting from transforming the specified finite vector of size K plus (K choose 2).

See cov_matrix_free() for the inverse transform.

Template Parameters
Ttype of input vector (must be a var_value<S> where S inherits from EigenBase)
Parameters
xThe vector to convert to a covariance matrix.
KThe dimensions of the resulting covariance matrix.
lpReference
Exceptions
std::domain_errorif (x.size() != K + (K choose 2)).

Definition at line 77 of file cov_matrix_constrain.hpp.