I've solved the problem. Instead of using insert()
, I used push_back()
For the record, this is the working version:
// random number between zero and max
FT r(FT max = 1.0) { return max * (FT)rand() / (FT)RAND_MAX; }
// random (uniform)
void generators_random(unsigned int nb_generators)
{
Dt2::clear();
for(unsigned int i = 0; i < nb_generators; i++)
this->push_back(Point(r(), r()));
}