Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::independent_bits_engine<Engine,W,UIntType>::seed

      From cppreference.com
      <cpp‎ |numeric‎ |random‎ |independent bits engine

      [edit template]
       
       
       
      Pseudo-random number generation
       
       
      void seed();
      (1)(since C++11)
      void seed( result_type value);
      (2)(since C++11)
      template<class SeedSeq>
      void seed( SeedSeq& seq);
      (3)(since C++11)

      Reinitializes the internal state of the underlying engine using a new seed value.

      1) Seeds the underlying engine with the default seed value. Effectively callse.seed(), wheree is the underlying engine.
      2) Seeds the underlying engine with the seed valuevalue. Effectively callse.seed(value), wheree is the underlying engine.
      3) Seeds the underlying engine with the seed sequenceseq. Effectively callse.seed(seq), wheree is the underlying engine.
      This overload participates in overload resolution only ifSeedSeq satisfies the requirements ofSeedSequence.

      [edit]Parameters

      value - seed value to use in the initialization of the internal state of the underlying engine
      seq - seed sequence to use in the initialization of the internal state of the underlying engine

      [edit]Exceptions

      3) IfSeedSeq is notstd::seed_seq, throws the exceptions thrown by theseq.generate call.

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      LWG 2181C++11overload(3) would not throw even if theseq.generate call throwspropagates the exception
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/numeric/random/independent_bits_engine/seed&oldid=132162"

      [8]ページ先頭

      ©2009-2025 Movatter.jp