Packagecom.degrafa.utilities.math
Classpublic class Gauss
InheritanceGauss Inheritance flash.events.EventDispatcher



Public Methods
 MethodDefined by
  
Gauss
  
eval(_f:Function, _a:Number, _b:Number, _n:uint = 5):Number
Gauss
Public Constants
 ConstantDefined by
  INVALID_PARAMS : String = "invalid_parameters"
[static]
Gauss
  MAX_POINTS : Number = 8
[static]
Gauss
Constructor detail
Gauss()constructor
public function Gauss()
Method detail
eval()method
public function eval(_f:Function, _a:Number, _b:Number, _n:uint = 5):Number

Parameters
_f:Function — - Reference to function to be integrated - must accept a numerical argument and return the function value at that argument.
 
_a:Number — - Left-hand value of interval.
 
_b:Number — - Right-hand value of inteval.
 
_n:uint (default = 5) — - Number of points -- must be between 2 and 8

Returns
Number — Number - approximate integral value over [_a, _b] or 0 if an error condition occured. Assign a handler for the 'invalid_parameters' event. The three possible error conditions are 1) non-numeric values for the interval, 2) an invalid interval, 3) an invalid function reference, and 4) an invalid number of samples (must be between two and 8
Constant detail
INVALID_PARAMSconstant
public static const INVALID_PARAMS:String = "invalid_parameters"
MAX_POINTSconstant 
public static const MAX_POINTS:Number = 8