SeedSequence#
-
class numpy::SeedSequence#
numpy C++ class.
Example#
#include <numpy/np_ndarray.h>
using namespace numpy;
// Use SeedSequence
SeedSequence obj;
// ... operations ...
Constructors#
Signature |
Location |
Example |
|---|---|---|
|
NP_BITGEN.H:101 |
|
|
NP_BITGEN.H:120 |
Indexing / Selection#
Signature |
Return Type |
Location |
Example |
|---|---|---|---|
|
const std::vector<uint64_t>& |
NP_BITGEN.H:156 |
Joining / Splitting#
Signature |
Return Type |
Location |
Example |
|---|---|---|---|
|
uint64_t |
NP_BITGEN.H:89 |
Code Examples#
The following examples are extracted from the test suite.
get_entropy (np_test_1_all.cpp:25068)
25058 break;
25059 }
25060 }
25061
25062 if (!same) {
25063 std::cout << " [FAIL] : in np_test_bitgen_seedsequence() : not reproducible";
25064 throw std::runtime_error("np_test_bitgen_seedsequence failed");
25065 }
25066
25067 // Test entropy
25068 auto entropy = ss.get_entropy();
25069 if (entropy.empty()) {
25070 std::cout << " [FAIL] : in np_test_bitgen_seedsequence() : entropy empty";
25071 throw std::runtime_error("np_test_bitgen_seedsequence failed");
25072 }
25073
25074 std::cout << " -> tests passed" << std::endl;
25075 }
25076
25077 // ============================================================================
25078 // GENERATOR TESTS