SeedSequence ============ .. cpp:class:: numpy::SeedSequence numpy C++ class. Example ------- .. code-block:: cpp #include using namespace numpy; // Use SeedSequence SeedSequence obj; // ... operations ... Constructors ------------ .. list-table:: :widths: 55 25 20 :header-rows: 1 * - Signature - Location - Example * - ``SeedSequence(std::optional>entropy = std::nullopt)`` - NP_BITGEN.H:101 - * - ``SeedSequence(uint64_tseed)`` - NP_BITGEN.H:120 - Indexing / Selection -------------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``const std::vector& get_entropy()`` - const std::vector& - NP_BITGEN.H:156 - :ref:`View ` Joining / Splitting ------------------- .. list-table:: :widths: 40 20 15 25 :header-rows: 1 * - Signature - Return Type - Location - Example * - ``uint64_t splitmix64(uint64_t &x)`` - uint64_t - NP_BITGEN.H:89 - Code Examples ------------- The following examples are extracted from the test suite. .. _example-seedsequence-get_entropy-0: .. dropdown:: get_entropy (np_test_1_all.cpp:25068) :class-title: example-dropdown .. code-block:: cpp :linenos: :lineno-start: 25058 :emphasize-lines: 11 break; } } if (!same) { std::cout << " [FAIL] : in np_test_bitgen_seedsequence() : not reproducible"; throw std::runtime_error("np_test_bitgen_seedsequence failed"); } // Test entropy auto entropy = ss.get_entropy(); if (entropy.empty()) { std::cout << " [FAIL] : in np_test_bitgen_seedsequence() : entropy empty"; throw std::runtime_error("np_test_bitgen_seedsequence failed"); } std::cout << " -> tests passed" << std::endl; } // ============================================================================ // GENERATOR TESTS