Package com.nr.min

Examples of com.nr.min.Bracketmethod.bracket()


    Ran myran=new Ran(17);
    Bracketmethod br = new Bracketmethod();
    for (i=0;i<N;i++) {
      a=50.0*myran.doub();
      b=a+span;
      br.bracket(a,b,this);
//      System.out.printf(br.ax << " " << br.bx << " " << br.cx);
//      System.out.printf(br.fa << " " << br.fb << " " << br.fc << endl);
      localflag = localflag || (br.fa < br.fb) || (br.fc < br.fb);
    }
    globalflag = globalflag || localflag;
View Full Code Here


    double sbeps=3.e-16;
    for (i=0;i<N;i++) {
      a=50.0*myran.doub();
      b=a+span;
      br.bracket(a,b,this);
      localflag = localflag || abs(br.fa - funk(br.ax))>sbeps
        || abs(br.fb - funk(br.bx))>sbeps
        || abs(br.fc - funk(br.cx))>sbeps;
    }
    globalflag = globalflag || localflag;
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.