/* -*- mode:c++; coding: koi8-r -*- */

#ifndef __Random_hpp__
#define __Random_hpp__

/* $Id: Random.hpp,v 1.1 2003/04/14 20:50:16 cher Exp $ */
/* Copyright (C) 2003 Alexander Chernov <cher@unicorn.cmc.msu.ru> */

/*
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 See the `COPYING' file for the full terms and conditions.
*/

#include "EnthropySource.hpp"
#include "BadArgsError.hpp"

class Random
{
  EnthropySource *src;

public:
  Random(EnthropySource *_src) throw (BadArgsError);
  ~Random() throw ();

  double uniform() throw ();
  double uniform(double a, double b) throw (BadArgsError);
  int uniform(int a, int b) throw (BadArgsError);

  double normal() throw ();
  double normal(double m, double sigma) throw (BadArgsError);

  double exponent(double lambda) throw (BadArgsError);

  double beta(double a, double b) throw (BadArgsError);

  int bernoully(double p) throw (BadArgsError);
  int binomial(int n, double p) throw (BadArgsError);
};

#endif /* __Random_hpp__ */

/*
 * Local variables:
 *  compile-command: "make -C .."
 *  c++-font-lock-extra-types: ("[A-Z]\\sw*[a-z]\\sw*")
 * End:
 */
