diff options
Diffstat (limited to 'Swiften/Base/RandomGenerator.h')
-rw-r--r-- | Swiften/Base/RandomGenerator.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Swiften/Base/RandomGenerator.h b/Swiften/Base/RandomGenerator.h new file mode 100644 index 0000000..a998e0d --- /dev/null +++ b/Swiften/Base/RandomGenerator.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2012 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <vector> + +namespace Swift { + class RandomGenerator { + public: + virtual ~RandomGenerator(); + + virtual int generateWeighedRandomNumber(std::vector<double>::const_iterator probabilities_begin, std::vector<double>::const_iterator probabilities_end) = 0; + }; +} |