31#ifndef NUMCPP_NO_USE_BOOST
36#include "boost/random/uniform_on_sphere.hpp"
59 template<
typename dtype,
typename GeneratorType = std::mt19937>
69 boost::random::uniform_on_sphere<dtype> dist(
static_cast<int>(inDims));
72 for (
uint32 row = 0; row < inNumPoints; ++row)
74 const auto& point = dist(generator);
75 std::copy(point.begin(), point.end(), returnArray.
begin(row));
92 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:139
iterator begin() noexcept
Definition NdArrayCore.hpp:1315
Definition Random/bernoulli.hpp:43
NdArray< dtype > uniformOnSphere(GeneratorType &generator, uint32 inNumPoints, uint32 inDims=2)
Definition uniformOnSphere.hpp:60
Definition Random/bernoulli.hpp:41
NdArray< dtype > uniformOnSphere(uint32 inNumPoints, uint32 inDims=2)
Definition uniformOnSphere.hpp:93
std::mt19937_64 generator_
generator function
Definition generator.hpp:35
std::uint32_t uint32
Definition Types.hpp:40