971 int flag,i,its,j,jj,k,l=0,nm;
972 double anorm,c,f,g,h,s,scale,x,y,z;
981 for (k=i;k<=m;k++) scale += fabs(
double(a.
At(k,i)));
985 s += a.
At(k,i)*a.
At(k,i);
992 for (s=0.0,k=i;k<=m;k++) s += a.
At(k,i)*a(k,j);
994 for (k=i;k<=m;k++) a.
At(k,j) += f*a.
At(k,i);
996 for (k=i;k<=m;k++) a.
At(k,i) *= scale;
1001 if (i <= m && i != n) {
1002 for (k=l;k<=n;k++) scale += fabs(
double(a.
At(i,k)));
1004 for (k=l;k<=n;k++) {
1006 s += a.
At(i,k)*a.
At(i,k);
1012 for (k=l;k<=n;k++) rv1[k]=a.
At(i,k)/h;
1013 for (j=l;j<=m;j++) {
1014 for (s=0.0,k=l;k<=n;k++) s += a.
At(j,k)*a.
At(i,k);
1015 for (k=l;k<=n;k++) a.
At(j,k) += s*rv1[k];
1017 for (k=l;k<=n;k++) a.
At(i,k) *= scale;
1020 anorm=
NR_FMAX(anorm,(fabs(
double(w[i]))+fabs(
double(rv1[i]))));
1022 for (i=n;i>=1;i--) {
1026 v.
At(j,i)=(a.
At(i,j)/a.
At(i,l))/g;
1027 for (j=l;j<=n;j++) {
1028 for (s=0.0,k=l;k<=n;k++) s += a.
At(i,k)*v.
At(k,j);
1029 for (k=l;k<=n;k++) v.
At(k,j) += s*v.
At(k,i);
1032 for (j=l;j<=n;j++) v.
At(i,j)=v.
At(j,i)=0.0;
1038 for (i=
NR_IMIN(m,n);i>=1;i--) {
1041 for (j=l;j<=n;j++) a.
At(i,j)=0.0;
1044 for (j=l;j<=n;j++) {
1045 for (s=0.0,k=l;k<=m;k++) s += a.
At(k,i)*a.
At(k,j);
1047 for (k=i;k<=m;k++) a.
At(k,j) += f*a.
At(k,i);
1049 for (j=i;j<=m;j++) a.
At(j,i) *= g;
1050 }
else for (j=i;j<=m;j++) a.
At(j,i)=0.0;
1053 for (k=n;k>=1;k--) {
1054 for (its=1;its<=30;its++) {
1056 for (l=k;l>=1;l--) {
1058 if ((
double)(fabs(
double(rv1[l])+anorm)) == anorm) {
1062 if ((
double)(fabs(
double(w[nm]))+anorm) == anorm)
break;
1067 for (i=l;i<=k;i++) {
1070 if ((
double)(fabs(f)+anorm) == anorm)
break;
1077 for (j=1;j<=m;j++) {
1089 for (j=1;j<=n;j++) v.
At(j,k) = -v.
At(j,k);
1100 f=((y-z)*(y+z)+(g-h)*(g+h))/(2.0*h*y);
1102 f=((x-z)*(x+z)+h*((y/(f+
NR_SIGN(g,f)))-h))/x;
1104 for (j=l;j<=nm;j++) {
1118 for (jj=1;jj<=n;jj++) {
1133 for (jj=1;jj<=m;jj++) {
static double NR_pythag(double a, double b)
static int NR_IMIN(int iminarg1, int iminarg2)
static double NR_FMAX(double maxarg1, double maxarg2)
static void Throw(const TStr &MsgStr)
static double NR_SIGN(double a, double b)
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const