/*
    Copyright (C) 2011 Brendon J. Brewer
    This file is part of DNest, the Diffusive Nested Sampler.

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

    DNest 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 General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DNest.  If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef _RandomNumberGenerator_
#define _RandomNumberGenerator_

#include <gsl/gsl_rng.h>

namespace DNest
{
	// This is a singleton class

	class RandomNumberGenerator
	{
		private:
			static RandomNumberGenerator instance;
			gsl_rng* rng;
			RandomNumberGenerator(int seed);
			~RandomNumberGenerator();

		public:
			double randomU();
			double randn();
			static RandomNumberGenerator& getInstance();
	};

	double randomU();
	double randn();
	int randInt(int numPossibilities);
}

#endif

