public double interpolate(double[] unknownCoord){

    	    int nUnknown = unknownCoord.length;
    	    if(nUnknown!=this.nDimensions)throw new IllegalArgumentException("Number of unknown value coordinates, " + nUnknown + ", does not equal the number of tabulated data dimensions, " + this.nDimensions);

            switch(this.nDimensions){
                case 0:     throw new IllegalArgumentException("data array must have at least one dimension");
                case 1:     // If fOfX is one dimensional perform simple cubic spline
                            this.yValue = ((CubicSplineFast)(this.method)).interpolate(unknownCoord[0]);
                            break;
                case 2:     // If fOfX is two dimensional perform bicubic spline
                            this.yValue = ((BiCubicSplineFast)(this.method)).interpolate(unknownCoord[0], unknownCoord[1]);
                            break;
                default:    // If fOfX is greater than two dimensional, recursively call PolyCubicSplineFast
                            //  with, as arguments, the n1 fOfX sub-arrays, each of (number of dimensions - 1) dimensions,
                            //  where n1 is the number of x1 variables.
                            double[] newCoord = new double[this.nDimensions-1];
                            for(int i=0; i<this.nDimensions-1; i++){
                                newCoord[i] = unknownCoord[i+1];
                            }
                            for(int i=0; i<this.dimOne; i++){
                                csArray[i] = pcs[i].interpolate(newCoord);
                            }

                            // Perform simple cubic spline on the array of above returned interpolates
                            CubicSplineFast ncs = new CubicSplineFast(this.xArray[0], this.csArray);
            	    	    this.yValue = ncs.interpolate(unknownCoord[0]);
            }

            return this.yValue;
    	}