19 #define REPORT { static ExeCounter ExeCount(__LINE__,21); ++ExeCount; } 33 for (
int i = 1; i < n; ++i)
35 Real f = 1.0 / sqrt((
Real)i * (i+1));
36 H.
submatrix(i,i,1,i) = -f; H(i,i+1) = f * i;
38 if (full) { H.
row(n) = 1.0 / sqrt((
Real)n); }
54 for (
int i = 1; i < n; ++i)
55 { sum += X(i); Y(i) = (i * X(i+1) -
sum) / sqrt((
Real)i * (i+1)); }
56 if (full) { sum += X(n); Y(n) = sum / sqrt((
Real)n); }
64 Tracer et(
"Helmert:single element ");
70 if (j > 1) Y(j-1) = sqrt((
Real)(j-1) / (
Real)j);
71 for (
int i = j; i < n; ++i) Y(i) = - 1.0 / sqrt((
Real)i * (i+1));
72 if (full) Y(n) = 1.0 / sqrt((
Real)n);
79 Tracer et(
"Helmert_transpose * CV ");
81 if (full) sum = Y(n) / sqrt((
Real)n);
else { sum = 0.0; ++n; }
83 for (
int i = n-1; i > 0; --i)
85 Real Yi = Y(i) / sqrt((
Real)i * (i+1));
86 X(i+1) = i * Yi +
sum; sum -= Yi;
96 Tracer et(
"Helmert_transpose:single element ");
98 if (full) sum = Y(n) / sqrt((
Real)n);
else { sum = 0.0; ++n; }
100 for (
int i = n-1; i > 0; --i)
102 Real Yi = Y(i) / sqrt((
Real)i * (i+1));
103 if (i+1 == j)
return i * Yi +
sum;
112 Tracer et(
"Helmert * Matrix");
117 for (
int j = 1; j <= n; ++j)
128 Tracer et(
"Helmert_transpose * Matrix ");
131 for (
int j = 1; j <= n; ++j)
ReturnMatrix Helmert(int n, bool full)
Miscellaneous exception (details in character string).
ReturnMatrix for_return() const
ReturnMatrix Helmert_transpose(const ColumnVector &Y, bool full)
GetSubMatrix Column(int f) const
The usual rectangular matrix.
virtual void resize(int, int)
Real sum(const BaseMatrix &B)
GetSubMatrix submatrix(int, int, int, int) const
GetSubMatrix row(int) const