31#ifndef NUMCPP_NO_USE_BOOST
35#include "boost/random/uniform_on_sphere.hpp"
58 template<
typename dtype,
typename GeneratorType = std::mt19937>
68 boost::random::uniform_on_sphere<dtype> dist(
static_cast<int>(inDims));
71 for (
uint32 row = 0; row < inNumPoints; ++row)
73 const auto& point = dist(generator);
74 std::copy(point.begin(), point.end(), returnArray.
begin(row));
91 template<
typename dtype>
#define STATIC_ASSERT_FLOAT(dtype)
Definition StaticAsserts.hpp:50
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:135
iterator begin() noexcept
Definition NdArrayCore.hpp:1311
Definition Random/bernoulli.hpp:41
NdArray< dtype > uniformOnSphere(GeneratorType &generator, uint32 inNumPoints, uint32 inDims=2)
Definition uniformOnSphere.hpp:59
Definition Random/bernoulli.hpp:39
NdArray< dtype > uniformOnSphere(uint32 inNumPoints, uint32 inDims=2)
Definition uniformOnSphere.hpp:92
std::mt19937_64 generator_
generator function
Definition generator.hpp:35
std::uint32_t uint32
Definition Types.hpp:40