Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      C++ named requirements:RandomNumberEngineAdaptor(since C++11)

      From cppreference.com
      <cpp‎ |named req
       
       
      C++ named requirements
       

      ARandomNumberEngineAdaptor is aRandomNumberEngine that transforms the output of anotherRandomNumberEngine, the latter of which is termed abase engine.

      [edit]Requirements

      Given

      • B, aRandomNumberEngine
      • b, an object of typeB
      • A, aRandomNumberEngineAdaptor, adaptingB as a base engine
      • a, an object of typeA
      functionsemantics
      A::A(); The base engine is initialized as if by its default constructor.
      bool operator==(const A& lhs,const A& rhs); Returns whetherlhs's base engine is equal torhs's base engine or not.
      A::A(result_type s); The base engine is initialized withs.
      template<class Sseq> A::A(Sseq& q); The base engine is initialized withq.
      void seed(); Invokesb.seed().
      void seed(result_type s); Invokesb.seed(s).
      template<class Sseq>void seed(Sseq& q); Invokesb.seed(q).

      Furthermore

      • The complexity of each function ofA does not exceed the complexity of the function ofB
      • The state ofA includes the state ofB
      • The size ofA's state is no less than the size ofb
      • CopyingA's state includes copyingB's state
      • The textual representation ofA includes the textual representation ofB

      [edit]Standard library

      The following standard library facilities satisfyRandomNumberEngineAdaptor:

      discards some output of a random number engine
      (class template)[edit]
      packs the output of a random number engine into blocks of a specified number of bits
      (class template)[edit]
      delivers the output of a random number engine in a different order
      (class template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/named_req/RandomNumberEngineAdaptor&oldid=144928"

      [8]ページ先頭

      ©2009-2025 Movatter.jp