Random_ChiSq Routines |
Unit
QESBPCSRandom
Overloaded Variants |
Function Random_ChiSq(const DF: Integer): Extended; |
Function Random_ChiSq(const DF: Integer; RandomGenerator: TRandomGenFunction): Extended; |
Declaration
Function Random_ChiSq(const DF: Integer): Extended;
Parameters |
DF | Degrees of Freedom - must be positive. |
RandomGenerator | Optional Function to use for Uniform Random Number Generator. If omitted, Delphi's Random function is used, and if this is done remember to call Randomize if you don't want repeated values. |
Category
Arithmetic Routines for FloatsImplementation
function Random_ChiSq (const DF: Integer): Extended; begin Result := Random_ChiSq (DF, DelphiRandom); End; |
Declaration
Function Random_ChiSq(const DF: Integer; RandomGenerator: TRandomGenFunction): Extended;Implementation
function Random_ChiSq (const DF: Integer; RandomGenerator: TRandomGenFunction): Extended; begin Result := 2.0 * Random_Gamma (0.5 * DF, RandomGenerator) End; |
|