statistic helper classes

test-cases
modified grid importance for better trap-detection
This commit is contained in:
2016-10-01 13:17:14 +02:00
parent 729340031d
commit 51c0945e12
15 changed files with 343 additions and 64 deletions

View File

@@ -91,6 +91,15 @@ public:
}
/** get a random element based on its probability */
T get() {
double tmp; // ignored
return get(tmp);
}
/**
* get a random element based on its probability.
* the probability of the picked element is returned using the out parameter
*/
T get(double& elemProbability) {
// generate random number between [0:cumProbability]