NumCpp  2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
shuffle.hpp
Go to the documentation of this file.
1
29#pragma once
30
31#include <algorithm>
32
33#include "NumCpp/NdArray.hpp"
35
36namespace nc::random
37{
38 namespace detail
39 {
40 //============================================================================
41 // Method Description:
47 template<typename dtype, typename GeneratorType = std::mt19937>
49 {
50 std::shuffle(inArray.begin(), inArray.end(), generator);
51 }
52 } // namespace detail
53
54 //============================================================================
55 // Method Description:
60 template<typename dtype>
65} // namespace nc::random
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
void shuffle(GeneratorType &generator, NdArray< dtype > &inArray)
Definition shuffle.hpp:48
Definition Random/bernoulli.hpp:41
std::mt19937_64 generator_
generator function
Definition generator.hpp:35
void shuffle(NdArray< dtype > &inArray)
Definition shuffle.hpp:61
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59