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

Function UCrcond

bayes/src/UdU.cpp:147–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147UTriMatrix::value_type UCrcond (const UTriMatrix& UC)
148/* Estimate the reciprocal condition number for inversion of the original PSD
149 * matrix for which U is the factor UU'
150 *
151 * The rcond of the original matrix is simply the square of the rcond of diagonal(UC)
152 */
153{
154 assert (UC.size1() == UC.size2());
155 Float rcond = rcond_internal (diag(UC));
156 // Square to get rcond of original matrix, take care to propogate rcond's sign!
157 if (rcond < 0)
158 return -(rcond*rcond);
159 else
160 return rcond*rcond;
161}
162
163inline UTriMatrix::value_type UCrcond (const UTriMatrix& UC, std::size_t n)
164/* As above but for use by UCfactor functions where only first n elements are used

Callers 3

predictMethod · 0.85
observe_innovationMethod · 0.85
UCfactorFunction · 0.85

Calls 2

rcond_internalFunction · 0.85
diagFunction · 0.85

Tested by

no test coverage detected