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

Function UdUseperate

bayes/src/UdU.cpp:751–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749}
750
751void UdUseperate (RowMatrix& U, Vec& d, const RowMatrix& UD)
752/* Extract the separate U and d parts of the UD factorisation
753 * Output:
754 * U and d parts of UD
755 */
756{
757 std::size_t i,j;
758 const std::size_t n = UD.size1();
759 assert (n == UD.size2());
760
761 for (j = 0; j < n; ++j)
762 {
763 // Extract d and set diagonal to 1
764 d[j] = UD(j,j);
765 RowMatrix::Row Uj(U,j);
766 Uj[j] = 1;
767 for (i = 0; i < j; ++i)
768 {
769 U(i,j) = UD(i,j);
770 // Zero lower triangle of U
771 Uj[i] = 0;
772 }
773 }
774}
775
776
777/*

Callers 2

initMethod · 0.85
roughen_correlatedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected