#ifndef CDSLIB_OPT_PERMUTATION_H
#define CDSLIB_OPT_PERMUTATION_H
-#include <stdlib.h> // rand, srand
+#include <cstdlib> // rand, srand
#include <random>
#include <algorithm> // std::shuffle
#include <numeric> // std::iota
/// Resets the generator to produce new sequence
void reset()
{
- m_nCur = m_nStart = integer_type( rand() ) % m_nMod;
+ m_nCur = m_nStart = integer_type( std::rand() ) % m_nMod;
}
};
/// Resets the generator to produce new sequence
void reset()
{
- m_nCur = m_nStart = integer_type( rand() ) & m_nMask;
+ m_nCur = m_nStart = integer_type( std::rand() ) & m_nMask;
}
};