Package com.nr.root.Roots

Examples of com.nr.root.Roots.Zbrak.zbrak()


   

    // Test rtbis
    System.out.println("Testing rtbis");
    Func_rtbis fx = new Func_rtbis();
    Zbrak z = new Zbrak();  z.zbrak(fx,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
    double[] root = new double[nroot];
    for (i=0;i<nroot;i++) {
      xacc=0.5*sbeps*(abs(xb1[i])+abs(xb2[i]));
      root[i]=rtbis(fx,xb1[i],xb2[i],xacc);
View Full Code Here


   

    // Test rtnewt
    System.out.println("Testing rtnewt");
    Funcd_rtnewt fxd = new Funcd_rtnewt();
    Zbrak z = new Zbrak();  z.zbrak(fxd,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
    double[] root = new double[nroot];
    for (i=0;i<nroot;i++) {
      xacc=0.5*sbeps*(abs(xb1[i])+abs(xb2[i]));
      root[i]=rtnewt(fxd,xb1[i],xb2[i],xacc);
View Full Code Here

   

    // Test rtflsp
    System.out.println("Testing rtflsp");
    Func_rtflsp fx = new Func_rtflsp();
    Zbrak z = new Zbrak();  z.zbrak(fx,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
   
    double[] root = new double[nroot];
    for (i=0;i<nroot;i++) {
      xacc=0.5*sbeps*(abs(xb1[i])+abs(xb2[i]));
 
View Full Code Here

    boolean localflag, globalflag=false;

    // Test rtsafe
    System.out.println("Testing rtsafe");
    Funcd_rtsafe fxd = new Funcd_rtsafe();
    Zbrak z = new Zbrak();  z.zbrak(fxd,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
    double[] root = new double[nroot];
    for (i=0;i<nroot;i++) {
      xacc=0.5*sbeps*(abs(xb1[i])+abs(xb2[i]));
      root[i]=rtsafe(fxd,xb1[i],xb2[i],xacc);
View Full Code Here

   

    // Test zbrent
    System.out.println("Testing zbrent");
    Func_zbrent fx = new Func_zbrent();
    Zbrak z = new Zbrak();  z.zbrak(fx,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
    double[] root=new double[nroot];
    for (i=0;i<nroot;i++) {
      xacc=0.5*sbeps*(abs(xb1[i])+abs(xb2[i]));
      root[i]=zbrent(fx,xb1[i],xb2[i],xacc);
View Full Code Here

   

    // Test rtsec
    System.out.println("Testing rtsec");
    Func_rtsec fx = new Func_rtsec();
    Zbrak z = new Zbrak();  z.zbrak(fx,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
    double[] root = new double[nroot];
    for (i=0;i<nroot;i++) {
      xacc=0.5*sbeps*(abs(xb1[i])+abs(xb2[i]));
      root[i]=rtsec(fx,xb1[i],xb2[i],xacc);
View Full Code Here

   

    // Test zbrak
    System.out.println("Testing zbrak");
    Func_zbrak fx = new Func_zbrak();
    Zbrak z = new Zbrak();  z.zbrak(fx,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
    for (i=0;i<nroot;i++)
      localflag = localflag || (fx.funk(xb1[i])*fx.funk(xb2[i]) >= 0.0);
    globalflag = globalflag || localflag;
    if (localflag) {
View Full Code Here

  
    // Test zriddr
    System.out.println("Testing zriddr");
    Func_zriddr fx = new Func_zriddr();
    Zbrak z = new Zbrak();  z.zbrak(fx,x1,x2,100);
    xb1= z.xb1;xb2=z.xb2;nroot = z.nroot;
    double[] root =new double[(nroot)];
    for (i=0;i<nroot;i++) {
      xacc=0.5*sbeps*(abs(xb1[i])+abs(xb2[i]));
      root[i]=zriddr(fx,xb1[i],xb2[i],xacc);
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.