forpy  2
sampling.h File Reference
#include <cereal/access.hpp>
#include <cereal/types/polymorphic.hpp>
#include <cstdint>
#include <random>
#include <type_traits>
#include <vector>
#include <algorithm>
#include "../global.h"
#include "./serialization/basics.h"

Go to the source code of this file.

Classes

class  forpy::SamplingWithoutReplacement< T >
 A lazy evaluation sampling without replacement. More...
 

Namespaces

 forpy
 

Macros

#define FORPY_UTIL_SAMPLING_H_
 

Functions

static int64_t forpy::ibinom (const int &n, int k)
 Integer binomial with overflow detection. More...
 
template<typename T >
static std::vector< T > forpy::unique_indices (T num, T min, const T &max, std::mt19937 *random_engine, bool return_sorted=false)
 Sampling without replacement. More...
 

Macro Definition Documentation

◆ FORPY_UTIL_SAMPLING_H_

#define FORPY_UTIL_SAMPLING_H_

Definition at line 4 of file sampling.h.