Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

ErfcFunction.java

00001 package Sct.function;
00002 
00003 import com.imsl.math.Sfun;
00004 
00005 public class ErfcFunction extends GenericFunction {
00006     
00007     public ErfcFunction() {
00008         super (1,3);
00009     }
00010     
00011     public double value(double[] vars) {
00012         double xx, y;
00013 
00014         // if width==0, return zero:
00015         if (params[2] == 0){
00016             xx = 0.;
00017         }else{
00018             xx = ( (params[1]-vars[0]) / params[2]) / 1.414213562;
00019         }
00020 
00021         y  = (params[0]/2.) * ( 1 + Sfun.erf(xx) );
00022 
00023         return y;   
00024     }
00025     
00026     public String getName() {
00027         return "erfc";
00028     }
00029     
00030 }

Generated on Thu Jul 15 09:55:42 2004 for SCT DAQ/DCS Software - Java by doxygen 1.3.5