25#define __BITPIT_COMMON_UTILS_SRC__
36template bool addToOrderedVector<>(
const long&, std::vector<long>&, std::less<long>);
37template bool addToOrderedVector<>(
const unsigned long&, std::vector<unsigned long>&, std::less<unsigned long>);
39template std::vector<long>::const_iterator findInOrderedVector<>(
const long&,
const std::vector<long>&, std::less<long>);
40template std::vector<unsigned long>::const_iterator findInOrderedVector<>(
const unsigned long&,
const std::vector<unsigned long>&, std::less<unsigned long>);
52void swapValue(std::vector<bool> &v, std::size_t i, std::size_t j)
71 std::cout <<
"error" << std::endl;
80 std::vector<int> set(m+1, -1);
81 for (
int i = 0; i < m+1; i++) {
86 for (
int i = 0; i < n; i++) {
87 int index = (int) round(((
double) N) * ((double) rand())/((
double) RAND_MAX));
109 std::size_t nDigits = 0;
129 for (
unsigned long i = 1; i <= n; ++i) {
void swapValue(std::vector< bool > &v, std::size_t i, std::size_t j)
unsigned long factorial(unsigned long n)
void extractWithoutReplacement(int n, int m, std::vector< int > &list)
std::size_t countDigits(int n)