Package com.nr.la

Examples of com.nr.la.QRdcmp.qtmult()


    // test update
    double[][] aa = buildMatrix(a);
    double[] s = new double[aa.length],t = new double[aa.length];
    ranvec(s); ranvec(t);
    double[] u = new double[aa.length],v = buildVector(t);
    aqr.qtmult(s,u);
    aqr.update(u,v);
    for (i=0;i<aa.length;i++) for (j=0;j<aa.length;j++) a[i][j] = aa[i][j]+s[i]*t[j];
    localflag = maxel(matsub(matmul(transpose(aqr.qt),aqr.r),a)) > sbeps;
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here


          w[i]=fvec[i]-fvcold[i]-sum;
          if (abs(w[i]) >= EPS*(abs(fvec[i])+abs(fvcold[i]))) skip=false;
          else w[i]=0.0;
        }
        if (!skip) {
          qr.qtmult(w,t);
          for (den=0.0,i=0;i<n;i++) den += SQR(s[i]);
          for (i=0;i<n;i++) s[i] /= den;
          qr.update(t,s);
          if (qr.sing) throw new IllegalArgumentException("singular update in broydn");
        }
View Full Code Here

          for (i=0;i<n;i++) s[i] /= den;
          qr.update(t,s);
          if (qr.sing) throw new IllegalArgumentException("singular update in broydn");
        }
      }
      qr.qtmult(fvec,p);
      for (i=0;i<n;i++)
        p[i] = -p[i];
      for (i=n-1;i>=0;i--) {
        for (sum=0.0,j=0;j<=i;j++) sum -= qr.r[j][i]*p[j];
        g[i]=sum;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.