NumCpp  2.13.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
standardNormal.hpp
Go to the documentation of this file.
1
28#pragma once
29
31#include "NumCpp/Core/Shape.hpp"
32#include "NumCpp/NdArray.hpp"
34
35namespace nc::random
36{
37 namespace detail
38 {
39 //============================================================================
40 // Method Description:
50 template<typename dtype, typename GeneratorType = std::mt19937>
52 {
54
55 return detail::normal<dtype>(generator, 0, 1);
56 }
57
58 //============================================================================
59 // Method Description:
71 template<typename dtype, typename GeneratorType = std::mt19937>
73 {
75
76 return detail::normal<dtype>(generator, inShape, 0, 1);
77 }
78 } // namespace detail
79
80 //============================================================================
81 // Method Description:
90 template<typename dtype>
92 {
93 return detail::standardNormal<dtype>(generator_);
94 }
95
96 //============================================================================
97 // Method Description:
108 template<typename dtype>
110 {
111 return detail::standardNormal<dtype>(generator_, inShape);
112 }
113} // namespace nc::random
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
A Shape Class for NdArrays.
Definition Core/shape.hpp:41
Definition Random/bernoulli.hpp:41
std::mt19937_64 generator_
generator function
Definition generator.hpp:35
dtype standardNormal()
Definition standardNormal.hpp:91
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59