Function uw12::utils::square
Defined in File utils.hpp
Function Documentation
-
inline auto uw12::utils::square(const linalg::Vec &vec, const double factor = 1)
Generate a square symmetric matrix from a vector
Generate a square symmetric matrix of size
n * nfrom a vector of sizen * (n+1) /2where the elements are the lower triangular elements of the output matrix in column major ordering. Inverse oflower.- Parameters
vec – Vector of lower triangular elements of symmetric matrix
factor – Off-diagonal factor
- Returns
Resulting symmetric matrix