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

◆ corr_matrix_constrain() [3/7]

template<typename T , require_std_vector_t< T > * = nullptr>
auto stan::math::corr_matrix_constrain ( T &&  y,
int  K 
)
inline

Return the correlation matrix of the specified dimensionality derived from the specified vector of unconstrained values.

The input vector must be of length \({k \choose 2} = \frac{k(k-1)}{2}\). The values in the input vector represent unconstrained (partial) correlations among the dimensions. This overload handles looping over the elements of a standard vector.

Template Parameters
TA standard vector with inner type inheriting from Eigen::DenseBase or a var_value with inner type inheriting from Eigen::DenseBase with compile time dynamic rows and 1 column
Parameters
yVector of unconstrained partial correlations
KDimensionality of returned correlation matrix

Definition at line 94 of file corr_matrix_constrain.hpp.