scicpp::random::rand

Defined in header <scicpp/core.hpp>

Return uniformly distributed random samples.


template<typename T, std::size_t N>
std::array<T, N> rand()

Generate a std::array of uniformly distributed random numbers in the range [0, 1).


template<typename T>
T rand()

Generate a single random number uniformly distributed in the range [0, 1).


template<typename T>
std::vector<T> rand(std::size_t N)

Generate a std::vector of uniformly distributed random numbers in the range [0, 1).


See also
Scipy documentation