Examples of doubleW


Examples of org.netlib.util.doubleW

    double x1[]={0.1,0.2,0.3,0.4,0.5};
    double x2[]={0.2,0.4,0.1,0.3,0.3};
    double act[]={0.0004,0.0064,0.0009,0.0144,0.0225};
    double[] ansy=new double[5],ansy1=new double[5],ansy2=new double[5];
    for (i=0;i<5;i++) {
      doubleW ansyW = new doubleW(ansy[i]);
      doubleW ansy1W = new doubleW(ansy1[i]);
      doubleW ansy2W = new doubleW(ansy2[i]);
     
      bcuint(y,y1,y2,y12,x1l,x1u,x2l,x2u,x1[i],x2[i],ansyW,ansy1W,ansy2W);
      ansy[i] = ansyW.val;
      ansy1[i] = ansy1W.val;
      ansy2[i] = ansy2W.val;
View Full Code Here

Examples of org.netlib.util.doubleW

  public void fasper(final double[] x, final double[] y, final double ofac, final double hifac) {
    final int MACC=4;
    int j,k,nwk,nfreq,nfreqt,n=x.length,np=px.length;
    double ck,ckk,cterm,cwt,den,df,effm,expy,fac,fndim,hc2wt,hs2wt,
      hypo,pmax,sterm,swt,xdif,xmax,xmin;
    doubleW ave = new doubleW(0);
    doubleW var = new doubleW(0);
   
    nout=(int)(0.5*ofac*hifac*n);
    nfreqt=(int)(ofac*hifac*n*MACC)// Size the FFT as next power of 2 above nfreqt
    nfreq=64;
    while (nfreq < nfreqt) nfreq <<= 1;
View Full Code Here

Examples of org.netlib.util.doubleW

  public void period(final double[] x, final double[] y, final double ofac, final double hifac) {
    final double TWOPI=6.283185307179586476;
    int i,j,n=x.length,np=px.length;
    double c,cc,cwtau,effm,expy,pnow,pymax,s,ss,sumc,sumcy,sums,sumsh,
      sumsy,swtau,wtau,xave,xdif,xmax,xmin,yy,arg,wtemp;
    doubleW ave = new doubleW(0);
    doubleW var = new doubleW(0);
   
    double[] wi = new double[n];
    double[] wpi = new double[n];
    double[] wpr = new double[n];
    double[] wr = new double[n];
View Full Code Here

Examples of org.netlib.util.doubleW

  public void dftint(final UniVarRealValueFun func, final double a, final double b, final double w,
      final doubleW cosint, final doubleW sinint) {
    final double TWOPI=6.283185307179586476;
    int j,nn;
    double c,cdft,en,s,sdft;
    doubleW corfac = new doubleW(0);
    doubleW corim = new doubleW(0);
    doubleW corre = new doubleW(0);
    double[] cpol = new double[MPOL];
    double[] spol = new double[MPOL];
    double[] xpol = new double[MPOL];
    if (init != 1 || a != aold || b != bold || func != funcold) {
        // Do we need to initialize, or is only ω changed?
View Full Code Here

Examples of org.netlib.util.doubleW

  @SuppressWarnings("unused")
  @Test
  public void test() {
    int i,nbin,N=100000,M=1000;
    doubleW df = new doubleW(0);
    doubleW chisq = new doubleW(0);
    doubleW prob = new doubleW(0);
    double range=10.0,xl,xu,mu,sig,binsize,sbeps=1.e-15;
    double fpr[]={-5.4660758319305183,-0.30564072790788632,-0.44755371579220488,
      -1.9442849501644124,0.66387554413406102,-0.004358322069596801,
      0.50260252584448173,9.5625234809339883,0.33471895222248255,
      -0.18486043134925173};
View Full Code Here

Examples of org.netlib.util.doubleW

      uj1=uj;
      uj=new double[nn][nn];
      double[][] temp = new double[nn][nn];
      interp(uj,uj1)// interpolate from grid j-1 to next finer grid j
      for (int jcycle=0;jcycle<maxcyc;jcycle++) {        // V-cycle loop
        doubleW trerr= new doubleW(1.0);   // R.h.s is dummy
        mg(j,uj,temp,rho,trerr);
        lop(temp,uj);   // Form residual ||d_h||
        matsub(temp,rho[j],temp);
        double res=anorm2(temp);
        if (res < trerr.val) break;    // No more V-cycles needed if residual small enough
View Full Code Here

Examples of org.netlib.util.doubleW

  public static void mg(final int j, final double[][] u, final double[][] rhs,
    final double[][][]rho, final doubleW trerr) {
    final int NPRE=1,NPOST=1;
    // Number of relaxation sweeps before and after the coarse-grid correction is computed
    final double ALPHA=0.33;   // Relates the estimated truncation error to the norm of the residual
    doubleW dum= new doubleW(-1.0);
    int nf=u.length;
    int nc=(nf+1)/2;
    double[][] temp = new double[nf][nf];
    if (j == 0) {   // Bottom of V:  Solve on coarsest grid.
      matadd(rhs,rho[j],temp);
View Full Code Here

Examples of org.netlib.util.doubleW

  @SuppressWarnings("unused")
  @Test
  public void test() {
    int i,nbin,N=100000,M=1000;
    doubleW df = new doubleW(0);
    doubleW chisq = new doubleW(0);
    doubleW prob = new doubleW(0);
    double range=10.0,xl,xu,mu,sig,binsize,sbeps=1.e-15;
    double fpr[]={-0.040234259938936714,-0.20636252953342041,-0.39109108994808306,
      -0.2184933724157597,1.3879841011885372,-0.62802347682638449,
      -0.023082200554415865,-0.18525427215527071,-1.5890668800145005,
      -1.728054800100431};
View Full Code Here

Examples of org.netlib.util.doubleW

  }

  @Test
  public void test() {
    int i,j,NDIM=4,M=10; // NTRIAL=6, not used.
    doubleW fnew = new doubleW(0);
    double fold,stpmax=1.0,sbeps=1.e-14;
    double x0[]={0.5,-0.5,1.0,1.0,1.0,0.5,-1.0,-1.0,-1.0,-0.5};
    double x1[]={0.5,-0.5,1.0,1.0,0.5,1.0,-1.0,-1.0,-0.5,-1.0};
    double x2[]={0.5,-0.5,1.0,0.5,1.0,1.0,-1.0,-0.5,-1.0,-1.0};
    double x3[]={0.5,-0.5,0.9,1.0,1.0,1.0,-0.9,-1.0,-1.0,-1.0};
View Full Code Here

Examples of org.netlib.util.doubleW

  @Test
  public void test() {
    int i,N=20;
    intW iter = new intW(0);
    doubleW f0=new doubleW(0),f=new doubleW(0);
    double theta,phi,d0,d,pi=acos(-1.0);
    double sbeps1=5.0e-8,sbeps2=5.0e-16,gtol=5.0e-8;
    double[] p = new double[3];
    boolean localflag=false, globalflag=false;
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.