Package com.nr.min

Examples of com.nr.min.Powell.minimize()


    // Test Powell
    System.out.println("Testing Powell, interface1");

    Powell pow1 = new Powell(this);
    p[0]=p[1]=p[2]=0.0;
    p=pow1.minimize(p);
    f0=pow1.fret;
    d0=sqrt(SQR(p[0])+SQR(p[1])+SQR(p[2]));

    for (i=0;i<N;i++) {
      theta=pi*i/N;
 
View Full Code Here


      theta=pi*i/N;
      phi=pi*i/N;
      p[0]=sin(phi)*cos(theta);
      p[1]=sin(phi)*sin(theta);
      p[2]=cos(phi);
      p=pow1.minimize(p);
      f=pow1.fret;
      d=sqrt(SQR(p[0])+SQR(p[1])+SQR(p[2]));
//      System.out.printf(abs(d-d0) << " " << abs(f-f0));

      localflag = localflag || abs(d-d0) > sbeps1;
View Full Code Here

      ximat[1][1]=cos(theta)*sin(phi);
      ximat[2][1]=-sin(theta);
      ximat[0][2]=-sin(theta);
      ximat[1][2]=cos(theta);
      ximat[2][2]=0.0;
      p=pow2.minimize(p,ximat);
      f=pow2.fret;
      d=sqrt(SQR(p[0])+SQR(p[1])+SQR(p[2]));
//      System.out.printf(abs(d-d0) << " " << abs(f-f0));

      localflag = localflag || abs(d-d0) > sbeps1;
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.