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

Function assert_isPSD

bayes/src/matSup.cpp:38–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37#ifndef NDEBUG
38void assert_isPSD (const SymMatrix &M)
39/* Assert a Matrix is Positive Semi Definite via the algorithm in isPSD
40 * Requires 'cerr' and 'assert' to abort execution
41 */
42{
43 bool bPSD = isPSD(M);
44 if (!bPSD) {
45 // Display Non PSD
46 std::cerr.flags(std::ios::scientific); std::cerr.precision(17);
47 std::cerr << M;
48 }
49 assert(bPSD);
50}
51#endif
52
53

Callers

nothing calls this directly

Calls 1

isPSDFunction · 0.85

Tested by

no test coverage detected