NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
shuffle.hpp
Go to the documentation of this file.
1
#pragma once
30
31
#include "
NumCpp/NdArray.hpp
"
32
#include "
NumCpp/Random/generator.hpp
"
33
34
#include <algorithm>
35
36
namespace
nc
37
{
38
namespace
random
39
{
40
//============================================================================
41
// Method Description:
47
template
<
typename
dtype>
48
void
shuffle
(
NdArray<dtype>
& inArray)
49
{
50
std::shuffle
(inArray.
begin
(), inArray.
end
(),
generator_
);
51
}
52
}
// namespace random
53
}
// namespace nc
nc::random::shuffle
void shuffle(NdArray< dtype > &inArray)
Definition:
shuffle.hpp:48
generator.hpp
nc::NdArray< dtype >
NdArray.hpp
nc::NdArray::end
iterator end() noexcept
Definition:
NdArrayCore.hpp:1431
nc
Definition:
Coordinate.hpp:44
nc::random::generator_
static std::mt19937_64 generator_
generator function
Definition:
generator.hpp:39
nc::NdArray::begin
iterator begin() noexcept
Definition:
NdArrayCore.hpp:1087
include
NumCpp
Random
shuffle.hpp
Generated by
1.8.17