18 double a[] = {12, -51, 4, 6, 167, -68, -4, 24, -41};
22 std::cout <<
"initial matrox A " << std::endl;
30 std::cout <<
"Orthogonal Q matrix " << std::endl;
33 auto Q =
decomp.GetOrthogonalMatrix();
36 std::cout <<
"Upper Triangular R matrix " << std::endl;
45 std::cout <<
"Computed A matrix from Q * R " << std::endl;
48 for (
int i = 0; i < A.GetNrows(); ++i) {
49 for (
int j = 0;
j < A.GetNcols(); ++
j) {
51 Error(
"decomposeQR",
"Reconstrate matrix is not equal to the original : %f different than %f",
compA(i,
j),A(i,
j));
60 for (
int i = 0; i < Q.GetNrows(); ++i) {
61 for (
int j = 0;
j < Q.GetNcols(); ++
j) {
64 Error(
"decomposeQR",
"Q matrix is not orthogonal ");
#define R(a, b, c, d, e, f, g, h, i)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Bool_t AreEqualAbs(Double_t af, Double_t bf, Double_t epsilon)
Comparing floating points.