Package flanagan.interpolation

Examples of flanagan.interpolation.CubicSpline.interpolate()


                double[][] array = new double[lengthT85][lengthC85];
                for(int i=0; i<lengthT85; i++){
                    double[] lvisc = {Math.log(zero[i]), Math.log(twenty[i]), Math.log(forty[i]), Math.log(sixty[i])};
                    CubicSpline cs = new CubicSpline(concn85, lvisc);
                    for(int j=0; j<lengthC85; j++){
                        array[i][j] = cs.interpolate(conc85[j]);
                    }
                }
                BiCubicSpline bcs = new BiCubicSpline(temp85, conc85, array);
                ret = Math.exp(bcs.interpolate(temperature, gPerL));
            }
View Full Code Here


                    double[][] array = new double[lengthT100][lengthC100];
                    for(int i=0; i<lengthT100; i++){
                        double[] lvisc = {Math.log(zero[i]), Math.log(forty[i]), Math.log(sixty[i])};
                        CubicSpline cs = new CubicSpline(concn100, lvisc);
                        for(int j=0; j<lengthC100; j++){
                            array[i][j] = cs.interpolate(conc100[j]);

                        }
                    }
                    BiCubicSpline bcs = new BiCubicSpline(temp100, conc100, array);
                    ret = Math.exp(bcs.interpolate(temperature, gPerL));
View Full Code Here

        }
        else{
            if(temperature==20 && gPerL<=1208.2){
                double[] concM = amC.subarray_as_double(0, viscLength-1);
                CubicSpline cs = new CubicSpline(concM, visc20);
                ret = cs.interpolate(gPerL);
            }
            else{
                throw new IllegalArgumentException("Concentration, " + gPerL + " g/l,  for this temperature, " + temperature + " C,is out of range");
            }
        }
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

                    CubicSpline cs = new CubicSpline(holdT, holdI);
                    this.time[0] = holdT[0];
                    this.inputT[0] = holdI[0];
                    for(int i=1; i<this.sampLen-1; i++){
                        this.time[i] = this.time[i-1] = this.deltaT;
                        this.inputT[i] = cs.interpolate(this.time[i]);
                    }
                    this.time[sampLen-1] = holdT[holdS];
                    this.inputT[sampLen-1] = holdI[holdS];
                }
            }
View Full Code Here

                    CubicSpline cs = new CubicSpline(holdT, holdI);
                    this.time[0] = holdT[0];
                    this.inputT[0] = holdI[0];
                    for(int i=1; i<this.sampLen-1; i++){
                        this.time[i] = this.time[i-1] = this.deltaT;
                        this.inputT[i] = cs.interpolate(this.time[i]);
                    }
                    this.time[sampLen-1] = holdT[holdS];
                    this.inputT[sampLen-1] = holdI[holdS];
                }
            }
View Full Code Here

                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

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.