Cauchy.h

00001 /*  _________________________________________________________________________
00002  *
00003  *  UTILIB: A utility library for developing portable C++ codes.
00004  *  Copyright (c) 2001, Sandia National Laboratories.
00005  *  This software is distributed under the GNU Lesser General Public License.
00006  *  For more information, see the README file in the top UTILIB directory.
00007  *  _________________________________________________________________________
00008  */
00009 
00010 //
00011 // Cauchy.h
00012 //
00021 #ifndef __Cauchy_h
00022 #define __Cauchy_h
00023 
00024 
00025 #include "CRandVar.extern.h"
00026 #include "Random.h"
00027 
00028 
00029 class UTILIB_API Cauchy: public externCRandVar {
00030 
00031 public:
00032 
00034     Cauchy(RNG *gen=NULL, double alpha=0.0, double beta=1.0);
00035 
00037     double alpha;
00039     double beta;
00040 
00041 protected:
00042 
00044     double eval_c_func();
00045 
00046 };
00047 
00048 
00049 inline Cauchy::Cauchy(RNG *gen, double alpha_, double beta_)
00050 :externCRandVar(gen)
00051 {alpha=alpha_; beta=beta_;}
00052 
00053 
00054 inline double Cauchy::eval_c_func()
00055 { return rcauchy(alpha,beta); }
00056 
00057 #endif