Package flanagan.interpolation

Examples of flanagan.interpolation.CubicSpline.interpolate()


                interpData = new double[nInterp];
                CubicSpline cs = new CubicSpline(dataX, this.sortedData);
                double interp = 0.0;
                for(int i=0; i<nInterp-1; i++){
                    interpData[i]=cs.interpolate(interp);
                    interp += incrI;

                }
                interpData[nInterp-1] = (double)(this.numberOfDataPoints-1);
            }
View Full Code Here


                        double[] tempy = new double[100];
                        double incr = (interpLx[maxIindex]-interpLx[0])/99;
                        double intr = interpLx[0];
                        for(int i=0; i<99; i++){
                            tempx[i] = intr;
                            tempy[i] = csl.interpolate(intr);
                            intr += incr;
                        }
                        tempy[99] = interpLy[maxIindex];
                        tempx[99] = interpLx[maxIindex];
                        boolean testt = true;
View Full Code Here

                        double[] tempy = new double[100];
                        double incr = (interpLx[nDif-1]-interpLx[0])/99;
                        double intr = interpLx[0];
                        for(int i=0; i<99; i++){
                            tempx[i] = intr;
                            tempy[i] = csl.interpolate(intr);
                            intr += incr;
                        }
                        tempy[99] = interpLy[nDif-1];
                        tempx[99] = interpLx[nDif-1];
                        boolean testt = true;
View Full Code Here

                    cs.calcDeriv();
                    xoldpoint=xBot+(int)(((xcs[0]-xLow)/xdenom)*xLen);
                    yoldpoint=yBot-(int)(((ycs[0]-yLow)/ydenom)*yLen);
                    for(int ii=1; ii<niPoints; ii++){
                           xnewpoint=xBot+(int)(((ics[ii]-xLow)/xdenom)*xLen);
                          ynewpoint=yBot-(int)(((cs.interpolate(ics[ii])-yLow)/ydenom)*yLen);
                          btest2=printCheck(trimOpt[i], xoldpoint, xnewpoint, yoldpoint, ynewpoint);
                          if(btest2){
                              if(this.lineOpt[i]==2){
                                    dsum++;
                                    if(dsum>dashLength[i]){
View Full Code Here

                    cs.calcDeriv();
                    xoldpoint=xBot+(int)(((xcs[0]-xLow)/xdenom)*xLen);
                    yoldpoint=yBot-(int)(((ycs[0]-yLow)/ydenom)*yLen);
                    for(int ii=1; ii<niPoints; ii++){
                          ynewpoint=yBot+(int)(((ics[ii]-yLow)/ydenom)*yLen);
                          xnewpoint=xBot-(int)(((cs.interpolate(ics[ii])-xLow)/xdenom)*xLen);
                          btest2=printCheck(trimOpt[i], xoldpoint, xnewpoint, yoldpoint, ynewpoint);
                          if(btest2){
                              if(this.lineOpt[i]==2){
                                    dsum++;
                                    if(dsum>dashLength[i]){
View Full Code Here

                    for(int i=0; i<this.nWorking; i++)ee[i] = Math.abs(liee.interpolate(xx[i]));
                }
                else{
                    // cubic spline interpolation if weights are monotonic without big jumps
                    CubicSpline csee = new CubicSpline(this.analyteConcns, sWeights);
                    for(int i=0; i<this.nWorking; i++)ee[i] = Math.abs(csee.interpolate(xx[i]));
                }
            }
            this.errorp = new CubicSpline(yy, ee);

            // Calculate the estimated errors in the estimated concentrations for each of the data points
View Full Code Here

            double incr = (resp[npe-1] - resp[0])/1000;
            for(int i=1; i<1000; i++){
                respe[i] = respe[i-1] + incr;
            }
            for(int i=0; i<1001; i++){
                xerre[i] = cspe.interpolate(respe[i]);
            }
            Stat stat = new Stat(xerre);
            this.minimumAerror = stat.minimum();
            this.maximumAerror = stat.maximum();
            this.meanAerror = stat.mean();
View Full Code Here

                    tr[i] = low+i;
                    trd[i] = (double)tr[i];
                    pp[i] = Stat.erlangBprobability(totalTraffic, tr[i]);
                }
                CubicSpline cs = new CubicSpline(trd, pp);
                prob = cs.interpolate(totalResources);
            }
            else{
                double logdenom = Math.log(crigf) + Stat.logGammaFunction(oneplustr);
                prob = Math.exp(lognumer - logdenom);
            }
View Full Code Here

    yt[2]=CubicSpline.interpolate(temperature, temp, rfInRe3, derivRe3);

    // cubic spline interpolation with respect to wavelength
    CubicSpline cs = new CubicSpline(wavl, yt);
    cs.calcDeriv();
    yRe = cs.interpolate(wavelength);

      return yRe;
    }

    // Returns the refractive index of pva solutions as a function of g/l pva concentration
View Full Code Here

        this.xInterp[this.nInterpPoints-1] = this.xPositions[this.nData-1];

        CubicSpline cs = new CubicSpline(this.xPositions, this.yPositions);

        // Interpolate y values
        for(int i=0; i<this.nInterpPoints; i++)this.yInterp[i] = cs.interpolate(this.xInterp[i]);

        // Plot interpolated curve
        if(this.plotOpt){
            int nMax = Math.max(this.nInterpPoints, this.nData);
            double[][] plotData = PlotGraph.data(2, nMax);
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.