OpenGTA/math/weighted_set.h
2018-09-23 11:35:20 +05:00

19 lines
306 B
C++
Executable File

#ifndef WEIGHTED_SET_H
#define WEIGHTED_SET_H
#include <vector>
namespace Math {
class WeightedSet {
public:
WeightedSet(unsigned int seed);
void add(unsigned int w, unsigned int e);
unsigned int getRandom();
private:
std::vector<unsigned int> elements;
};
}
#endif