Package org.netlib.util

Examples of org.netlib.util.doubleW


        double[] work = new double[3 * n];
        int[] lwork = new int[n];

        intW info = new intW(0);
        doubleW rcond = new doubleW(0);
        LAPACK.getInstance().dgbcon(norm.netlib(), n, kl, ku, LU.getData(),
           Matrices.ld(2 * kl + ku + 1), ipiv, anorm, rcond, work, lwork, info);

        if (info.val < 0)
            throw new IllegalArgumentException();
View Full Code Here


        double[] work = new double[3 * n];
        int[] iwork = new int[n];

        intW info = new intW(0);
        doubleW rcond = new doubleW(0);
        if (upper)
            LAPACK.getInstance().dppcon(UpLo.Upper.netlib(), n, Cu.getData(), anorm,
                    rcond, work, iwork, info);
        else
            LAPACK.getInstance().dppcon(UpLo.Lower.netlib(), n, Cl.getData(), anorm,
View Full Code Here

    int NPTS=10000,NBIN=101,NPNB=NPTS+NBIN;
    int n=0,k,nlim;
    double pi=acos(-1.0),x,sbeps;
    // Expected ave,vrnce
    double expect[]={pi/2.0,0.467401};
    doubleW ave=new doubleW(0),vrnce=new doubleW(0);
    double[] temp=new double[NPNB],e=buildVector(expect);
    boolean localflag, globalflag=false;

   
View Full Code Here

  @Test
  public void test() {
    int i,j;
    int NPTS=10000,NSHFT=10;
    doubleW ave1=new doubleW(0),ave2 = new doubleW(0);
    doubleW var1 = new doubleW(0), var2 = new doubleW(0);
    double sd,EPS=0.005,sbeps;
    double fingerprint[]={0.076341,0.156226,0.287591,0.478354,0.722981,
      1.0,0.722981,0.478354,0.287591,0.156226,0.076341};
    double[] data1=new double[NPTS],data2=new double[NPTS];
    double[] t=new double[NSHFT+1],prob=new double[NSHFT+1],tt= new double[NSHFT+1];
    boolean localflag=false, globalflag=false;

   

    // Test ttest
    System.out.println("Testing ttest");

    // Generate gaussian distributed data
    Normaldev ndev=new Normaldev(0.0,1.0,17);
    // Special case: identical distributions
    for (i=0;i<NPTS;i++) data1[i]=ndev.dev();
    for (i=0;i<NPTS;i++) data2[i]=(NSHFT/2.0)*EPS+data1[i];
    avevar(data1,ave1,var1);
    avevar(data2,ave2,var2);
    sd=sqrt(var1.val/NPTS*2.0);
    for (i=0;i<NSHFT+1;i++) {
      doubleW tw = new doubleW(0);
      doubleW pw = new doubleW(0);
      ttest(data1,data2,tw,pw);t[i]=tw.val;prob[i]=pw.val;
      tt[i]=((-NSHFT/2.0)+i)*EPS/sd;
//      System.out.printf(i << "  %f\n", t[i] << " %f\n", tt[i] << "  %f\n", prob[i]);
      for (j=0;j<NPTS;j++) data1[j] += EPS;
    }
View Full Code Here

  }

  @Test
  public void test() {
    int N=3,M=3;
    doubleW tau1=new doubleW(0),z1 = new doubleW(0),prob1 = new doubleW(0);
    double sbeps=1.e-6;
    double adata[]={1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0};
    double bdata[]={0.0,0.0,1.0,0.0,1.0,0.0,1.0,0.0,0.0};
    double cdata[]={2.0,0.0,0.0,0.0,2.0,0.0,0.0,0.0,2.0};
    double ddata[]={0.0,1.0,0.0,1.0,0.0,1.0,0.0,1.0,0.0};
View Full Code Here

  }

  @Test
  public void test() {
    int j,NPTS=10000;
    doubleW d1=new doubleW(0),prob1 = new doubleW(0);
    doubleW d2=new doubleW(0),prob2 = new doubleW(0);
    double[] data1=new double[NPTS],data2=new double[NPTS];
    boolean localflag=false,globalflag=false;

   
View Full Code Here

  public void tearDown() throws Exception {
  }

  @Test
  public void test() {
    doubleW s = new doubleW(0);
    double adata[]={0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0};
    double bdata[]={0.0,1.0,1.0,1.0,4.0,5.0,5.0,7.0,8.0,9.0};
    double cdata[]={1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0};
    double ddata[]={1.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0};
    double edata[]={1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,2.0};
View Full Code Here

  }

  @Test
  public void test() {
    int i,j,NVAL=11,NPTS=10000;
    doubleW ave1=new doubleW(0),var1 = new doubleW(0);
    doubleW f=new doubleW(0),prob = new doubleW(0);
    doubleW f1=new doubleW(0),f2 = new doubleW(0);
    doubleW prob1=new doubleW(0),prob2 = new doubleW(0);
   
    double factor,EPS=0.01,sbeps,sbeps1,sbeps2;
    double fingerprint[] = {1.0,0.618852,0.32215,0.139461,0.0498994,
      0.0147196,0.00357951,0.000718669,0.000119432,1.64815e-5,
      1.89557e-6};
View Full Code Here

  }

  @Test
  public void test() {
    int i,j,NTRIAL=100,NPT=1000;
    doubleW dd=new doubleW(0),pprob = new doubleW(0);
    double rms,u,factor,ave,sbeps;
    double[] x=new double[NPT],y=new double[NPT];
    double[] d=new double[NTRIAL],prob=new double[NTRIAL];
    double[] f=new double[NTRIAL],g=new double[NTRIAL];
    boolean localflag,globalflag=false;
View Full Code Here

  @Test
  public void test() {
    int i,N=10;
    double doses[]={56.1,64.1,70.0,66.6,82.0,91.3,90.0,99.7,115.3,110.0};
    double spores[]={0.11,0.40,0.37,0.48,0.75,0.66,0.71,1.20,1.01,0.95};
    doubleW prob1=new doubleW(0),r1 = new doubleW(0),z1 = new doubleW(0);
    doubleW prob2=new doubleW(0),r2 = new doubleW(0),z2 = new doubleW(0);
    double sbeps=1.e-16;
    double expect[]={0.9069586,0.2926505e-3,1.510110};
    double[] dose=buildVector(doses),spore=buildVector(spores),dose2=new double[N];
    boolean localflag=false,globalflag=false;
View Full Code Here

TOP

Related Classes of org.netlib.util.doubleW

Copyright © 2018 www.massapicom. 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.