MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / UdUdet

Function UdUdet

bayes/src/UdU.cpp:176–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176RowMatrix::value_type UdUdet (const RowMatrix& UD)
177/* Compute the determinant of the original PSD
178 * matrix for which UD is the factor UdU' or LdL'
179 * Result comes directly from determinant of diagonal in triangular matrices
180 * Defined to be 1 for 0 size UD
181 */
182{
183 const std::size_t n = UD.size1();
184 assert (n == UD.size2());
185 RowMatrix::value_type det = 1;
186 for (std::size_t i = 0; i < n; ++i) {
187 det *= UD(i,i);
188 }
189 return det;
190}
191
192
193RowMatrix::value_type UdUfactor_variant1 (RowMatrix& M, std::size_t n)

Callers 1

UdUinversePDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected