OpenSiv3D  v0.6.5
C++20 framework for creative coding
Sample.hpp File Reference
#include "Common.hpp"
#include "Array.hpp"
#include "Random.hpp"
#include "detail/Sample.ipp"

Namespaces

 s3d
 

Functions

template<class Iterator , class URBG >
auto s3d::Sample (Iterator begin, Iterator end, URBG &&urbg)
 指定した範囲から 1 つの要素をランダムに返します。 More...
 
template<class Iterator >
auto s3d::Sample (Iterator begin, Iterator end)
 指定した範囲から 1 つの要素をランダムに返します。 More...
 
template<class Iterator , class URBG >
auto s3d::Sample (size_t n, Iterator begin, Iterator end, URBG &&urbg)
 範囲から指定した個数の要素を重複無くランダムに選択して返します。 More...
 
template<class Iterator >
auto s3d::Sample (size_t n, Iterator begin, Iterator end)
 範囲から指定した個数の要素を重複無くランダムに選択して返します。 More...
 
template<class Container , class URBG >
auto s3d::Sample (const Container &c, URBG &&urbg)
 コンテナから 1 つの要素をランダムに返します。 More...
 
template<class Container >
auto s3d::Sample (const Container &c)
 コンテナから 1 つの要素をランダムに返します。 More...
 
template<class Container , class URBG >
Array< typename Container::value_type > s3d::Sample (size_t n, const Container &c, URBG &&urbg)
 コンテナから指定した個数の要素を重複無くランダムに選択して返します。 More...
 
template<class Container >
Array< typename Container::value_type > s3d::Sample (size_t n, const Container &c)
 コンテナから指定した個数の要素を重複無くランダムに選択して返します。 More...
 
template<class Type , class URBG >
auto s3d::Sample (std::initializer_list< Type > ilist, URBG &&urbg)
 initializer_list から 1 つの要素をランダムに返します。 More...
 
template<class Type >
auto s3d::Sample (std::initializer_list< Type > ilist)
 initializer_list から 1 つの要素をランダムに返します。 More...
 
template<class Type , class URBG >
Array< Type > s3d::Sample (size_t n, std::initializer_list< Type > ilist, URBG &&urbg)
 initializer_list から指定した個数の要素を重複無くランダムに選択して返します。 More...
 
template<class Type >
Array< Type > s3d::Sample (size_t n, std::initializer_list< Type > ilist)
 initializer_list から指定した個数の要素を重複無くランダムに選択して返します。 More...