CLHEP/Random/Stat.h

// $Id: Stat.h,v 1.3 2000/04/25 14:50:23 evc Exp $
// -*- C++ -*-
//
// -----------------------------------------------------------------------
//                             HEP Random
//                          --- HepStat ---
//          Purely static class containing useful statistics methods

// -----------------------------------------------------------------------

// HepStat is a substitute for using a namespace.
// One would never instantiate a HepStat object;
// usage of any of these methods looks like --
// 
// HepDouble x = HepStat::erf ( .1 );
//
// A user may wish to improve the readability of algortihm code which uses 
// one method many times by lines like using HepStat::erf
//
// and later, x = erf(u); will work.
//

// These methods are implemented in separate .cc files so that 
// user code need pull in only the code that is necessary.  Time
// (ROUGH estimates in cycles) and table footprint info is provided
// in this header.


// =======================================================================
// M. Fischler    - Created: 1/25/00
//
// M. Fischler	  - Inserted flatToGaussian 1/25/00
//			    From code of an attempt to speed up RandGauss
//			    by use of tables and splines.  The code was not
//		    	    significantly faster than Box-Mueller, so that
//		    	    algorithm is left as the RandGauss implementation.
//		  - Inserted inverseErf
// M. Fischler	  - Inserted gammln 2/4/00
// M. Fischler	  - Made constructor private; removed private destructor 4/17/00
// =======================================================================

#ifndef HepStat_h
#define HepStat_h 1

#include "CLHEP/config/CLHEP.h"

class HepStat {

private:
  HepStat();	
  // You CANNOT instantiate a HepStat object.

public:

  static HepDouble flatToGaussian (HepDouble r);
   // This is defined by the satement that if e() provides a uniform random
   // on (0,1) then flatToGaussian(e()) is distributed as a unit normal
   // Gaussian.  That is, flatToGaussian is the inverse of the c.d.f. of
   // a Gaussian.
  	// Footprint:  30 K  		// Time:  150 cycles

  static HepDouble inverseErf (HepDouble t);
  static HepDouble erf (HepDouble x);
        // defined in flatToGaussian.cc

  static HepDouble erfQ (HepDouble x);
  // Quicker, and with less footprint, than erf and gaussianCDF
  // but only accurate to 7 digits.
	  // Footprint:  0		// Time:  

  static HepDouble gammln (HepDouble x);
  // ln (gamma(x))

};

#endif

Generated by GNU enscript 1.6.1.