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);
92 template<
typename dtype>
95 return detail::uniformOnSphere<dtype>(
generator_, inNumPoints, inDims);
#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
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
static std::mt19937_64 generator_
generator function
Definition: generator.hpp:35
OutputIt copy(InputIt first, InputIt last, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:97
std::uint32_t uint32
Definition: Types.hpp:40