reference.xml 486 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970
  1. <?xml version="1.0" standalone="yes"?>
  2. <library-reference id="headers"><title>Headers</title><header name="boost/random.hpp">
  3. </header>
  4. <header name="boost/random/additive_combine.hpp">
  5. <namespace name="boost">
  6. <namespace name="random">
  7. <class name="additive_combine_engine"><template>
  8. <template-type-parameter name="MLCG1"/>
  9. <template-type-parameter name="MLCG2"/>
  10. </template><description><para>An instantiation of class template <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> models a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It combines two multiplicative <classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname> number generators, i.e. those with <computeroutput>c</computeroutput> = 0. It is described in</para><para> <blockquote><para> "Efficient and Portable Combined Random Number Generators", Pierre L'Ecuyer, Communications of the ACM, Vol. 31, No. 6, June 1988, pp. 742-749, 774 </para></blockquote> </para><para>The template parameters MLCG1 and MLCG2 shall denote two different <classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname> number generators, each with c = 0. Each invocation returns a random number X(n) := (MLCG1(n) - MLCG2(n)) mod (m1 - 1), where m1 denotes the modulus of MLCG1. </para></description><typedef name="first_base"><type>MLCG1</type></typedef>
  11. <typedef name="second_base"><type>MLCG2</type></typedef>
  12. <typedef name="result_type"><type>MLCG1::result_type</type></typedef>
  13. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  14. <method-group name="public static functions">
  15. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce </para></description></method>
  16. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce </para></description></method>
  17. </method-group>
  18. <method-group name="public member functions">
  19. <method name="seed"><type>void</type><description><para>Seeds an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> using the default seeds of the two base generators. </para></description></method>
  20. <method name="seed"><type>void</type><parameter name="seed"><paramtype>result_type</paramtype></parameter><description><para>Seeds an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput>, using <computeroutput>seed</computeroutput> as the seed for both base generators. </para></description></method>
  21. <method name="seed"><type>void</type><template>
  22. <template-type-parameter name="SeedSeq"/>
  23. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput>, using <computeroutput>seq</computeroutput> to seed both base generators.</para><para>See the warning on the corresponding constructor. </para></description></method>
  24. <method name="seed"><type>void</type><parameter name="seed1"><paramtype>typename MLCG1::result_type</paramtype></parameter><parameter name="seed2"><paramtype>typename MLCG2::result_type</paramtype></parameter><description><para>Seeds an <computeroutput>additive_combine</computeroutput> generator, using <computeroutput>seed1</computeroutput> and <computeroutput>seed2</computeroutput> as the seeds to the first and second base generators, respectively. </para></description></method>
  25. <method name="seed"><type>void</type><template>
  26. <template-type-parameter name="It"/>
  27. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> with values from the range defined by the input iterators first and last. first will be modified to point to the element after the last one used.</para><para>Throws: <computeroutput>std::invalid_argument</computeroutput> if the input range is too small.</para><para>Exception Safety: Basic </para></description></method>
  28. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  29. <method name="generate"><type>void</type><template>
  30. <template-type-parameter name="Iter"/>
  31. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  32. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  33. </method-group>
  34. <constructor><description><para>Constructs an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> using the default constructors of the two base generators. </para></description></constructor>
  35. <constructor specifiers="explicit"><parameter name="seed"><paramtype>result_type</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput>, using seed as the constructor argument for both base generators. </para></description></constructor>
  36. <constructor specifiers="explicit"><template>
  37. <template-type-parameter name="SeedSeq"/>
  38. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput>, using seq as the constructor argument for both base generators.</para><para> <warning><para> The semantics of this function are liable to change. A <computeroutput><classname alt="boost::random::seed_seq">seed_seq</classname></computeroutput> is designed to generate all the seeds in one shot, but this seeds the two base engines independantly and probably ends up giving the same sequence to both. </para></warning> </para></description></constructor>
  39. <constructor><parameter name="seed1"><paramtype>typename MLCG1::result_type</paramtype></parameter><parameter name="seed2"><paramtype>typename MLCG2::result_type</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput>, using <computeroutput>seed1</computeroutput> and <computeroutput>seed2</computeroutput> as the constructor argument to the first and second base generators, respectively. </para></description></constructor>
  40. <constructor><template>
  41. <template-type-parameter name="It"/>
  42. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Contructs an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> with values from the range defined by the input iterators first and last. first will be modified to point to the element after the last one used.</para><para>Throws: <computeroutput>std::invalid_argument</computeroutput> if the input range is too small.</para><para>Exception Safety: Basic </para></description></constructor>
  43. <method-group name="friend functions">
  44. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  45. <template-type-parameter name="CharT"/>
  46. <template-type-parameter name="Traits"/>
  47. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="r"><paramtype>const <classname>additive_combine_engine</classname> &amp;</paramtype></parameter><description><para>Writes the state of an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. The textual representation of an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> is the textual representation of the first base generator followed by the textual representation of the second base generator. </para></description></method>
  48. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  49. <template-type-parameter name="CharT"/>
  50. <template-type-parameter name="Traits"/>
  51. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="r"><paramtype>const <classname>additive_combine_engine</classname> &amp;</paramtype></parameter><description><para>Reads the state of an <computeroutput><classname alt="boost::random::additive_combine_engine">additive_combine_engine</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  52. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>additive_combine_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>additive_combine_engine</classname> &amp;</paramtype></parameter><description><para>Returns: true iff the two <computeroutput>additive_combine_engines</computeroutput> will produce the same sequence of values. </para></description></method>
  53. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>additive_combine_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>additive_combine_engine</classname> &amp;</paramtype></parameter><description><para>Returns: true iff the two <computeroutput>additive_combine_engines</computeroutput> will produce different sequences of values. </para></description></method>
  54. </method-group>
  55. </class><typedef name="ecuyer1988"><description><para>The specialization <classname alt="boost::random::ecuyer1988">ecuyer1988</classname> was suggested in</para><para> <blockquote><para> "Efficient and Portable Combined Random Number Generators", Pierre L'Ecuyer, Communications of the ACM, Vol. 31, No. 6, June 1988, pp. 742-749, 774 </para></blockquote> </para></description><type><classname>additive_combine_engine</classname>&lt; <classname>linear_congruential_engine</classname>&lt; uint32_t, 40014, 0, 2147483563 &gt;, <classname>linear_congruential_engine</classname>&lt; uint32_t, 40692, 0, 2147483399 &gt;&gt;</type></typedef>
  56. </namespace>
  57. </namespace>
  58. </header>
  59. <header name="boost/random/bernoulli_distribution.hpp">
  60. <namespace name="boost">
  61. <namespace name="random">
  62. <class name="bernoulli_distribution"><template>
  63. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  64. </template><description><para>Instantiations of class template <classname alt="boost::random::bernoulli_distribution">bernoulli_distribution</classname> model a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . Such a random distribution produces bool values distributed with probabilities P(true) = p and P(false) = 1-p. p is the parameter of the distribution. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>bernoulli_distribution</classname></type></typedef>
  65. <method-group name="public member functions">
  66. <method name="p" cv="const"><type>RealType</type><description><para>Returns the p parameter of the distribution. </para></description></method>
  67. </method-group>
  68. <constructor specifiers="explicit"><parameter name="p"><paramtype>RealType</paramtype><default>0.5</default></parameter><description><para>Constructs the parameters of the distribution.</para><para>Requires: 0 &lt;= p &lt;= 1 </para></description></constructor>
  69. <method-group name="friend functions">
  70. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  71. <template-type-parameter name="CharT"/>
  72. <template-type-parameter name="Traits"/>
  73. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a std::ostream. </para></description></method>
  74. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  75. <template-type-parameter name="CharT"/>
  76. <template-type-parameter name="Traits"/>
  77. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a std::istream. </para></description></method>
  78. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  79. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  80. </method-group>
  81. </class><typedef name="input_type"><type>int</type></typedef>
  82. <typedef name="result_type"><type>bool</type></typedef>
  83. <method-group name="public member functions">
  84. <method name="p" cv="const"><type>RealType</type><description><para>Returns: The "p" parameter of the distribution. </para></description></method>
  85. <method name="min" cv="const"><type>bool</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  86. <method name="max" cv="const"><type>bool</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  87. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  88. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  89. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  90. <method name="operator()" cv="const"><type>bool</type><template>
  91. <template-type-parameter name="Engine"/>
  92. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns: a random variate distributed according to the <classname alt="boost::random::bernoulli_distribution">bernoulli_distribution</classname> . </para></description></method>
  93. <method name="operator()" cv="const"><type>bool</type><template>
  94. <template-type-parameter name="Engine"/>
  95. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns: a random variate distributed according to the <classname alt="boost::random::bernoulli_distribution">bernoulli_distribution</classname> with parameters specified by param. </para></description></method>
  96. </method-group>
  97. <constructor specifiers="explicit"><parameter name="p"><paramtype>const RealType &amp;</paramtype><default>0.5</default></parameter><description><para>Constructs a <classname alt="boost::random::bernoulli_distribution">bernoulli_distribution</classname> object. p is the parameter of the distribution.</para><para>Requires: 0 &lt;= p &lt;= 1 </para></description></constructor>
  98. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs <classname alt="boost::random::bernoulli_distribution">bernoulli_distribution</classname> from its parameters </para></description></constructor>
  99. <method-group name="friend functions">
  100. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  101. <template-type-parameter name="CharT"/>
  102. <template-type-parameter name="Traits"/>
  103. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="bd"><paramtype>const <classname>bernoulli_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  104. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  105. <template-type-parameter name="CharT"/>
  106. <template-type-parameter name="Traits"/>
  107. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="bd"><paramtype>const <classname>bernoulli_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  108. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>bernoulli_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>bernoulli_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true iff the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  109. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>bernoulli_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>bernoulli_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true iff the two distributions will produce different sequences of values given equal generators. </para></description></method>
  110. </method-group>
  111. </class>
  112. </namespace>
  113. </namespace>
  114. </header>
  115. <header name="boost/random/beta_distribution.hpp">
  116. <namespace name="boost">
  117. <namespace name="random">
  118. <class name="beta_distribution"><template>
  119. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  120. </template><description><para>The beta distribution is a real-valued distribution which produces values in the range [0, 1]. It has two parameters, alpha and beta.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha, \beta)}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_0.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha, \beta)}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>beta_distribution</classname></type></typedef>
  121. <method-group name="public member functions">
  122. <method name="alpha" cv="const"><type>RealType</type><description><para>Returns the "alpha" parameter of the distribtuion. </para></description></method>
  123. <method name="beta" cv="const"><type>RealType</type><description><para>Returns the "beta" parameter of the distribution. </para></description></method>
  124. </method-group>
  125. <constructor specifiers="explicit"><parameter name="alpha"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="beta"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::beta_distribution::param_type">param_type</classname></computeroutput> from the "alpha" and "beta" parameters of the distribution.</para><para>Requires: alpha &gt; 0, beta &gt; 0 </para></description></constructor>
  126. <method-group name="friend functions">
  127. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  128. <template-type-parameter name="CharT"/>
  129. <template-type-parameter name="Traits"/>
  130. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::beta_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  131. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  132. <template-type-parameter name="CharT"/>
  133. <template-type-parameter name="Traits"/>
  134. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::beta_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  135. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  136. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  137. </method-group>
  138. </class><typedef name="result_type"><type>RealType</type></typedef>
  139. <typedef name="input_type"><type>RealType</type></typedef>
  140. <method-group name="public member functions">
  141. <method name="operator()" cv="const"><type>RealType</type><template>
  142. <template-type-parameter name="URNG"/>
  143. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the beta distribution. </para></description></method>
  144. <method name="operator()" cv="const"><type>RealType</type><template>
  145. <template-type-parameter name="URNG"/>
  146. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed accordint to the beta distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  147. <method name="alpha" cv="const"><type>RealType</type><description><para>Returns the "alpha" parameter of the distribution. </para></description></method>
  148. <method name="beta" cv="const"><type>RealType</type><description><para>Returns the "beta" parameter of the distribution. </para></description></method>
  149. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  150. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  151. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  152. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  153. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  154. </method-group>
  155. <constructor specifiers="explicit"><parameter name="alpha"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="beta"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::beta_distribution">beta_distribution</classname></computeroutput> from its "alpha" and "beta" parameters.</para><para>Requires: alpha &gt; 0, beta &gt; 0 </para></description></constructor>
  156. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::beta_distribution">beta_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  157. <method-group name="friend functions">
  158. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  159. <template-type-parameter name="CharT"/>
  160. <template-type-parameter name="Traits"/>
  161. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>beta_distribution</classname> &amp;</paramtype></parameter><description><para>Writes an <computeroutput><classname alt="boost::random::beta_distribution">beta_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  162. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  163. <template-type-parameter name="CharT"/>
  164. <template-type-parameter name="Traits"/>
  165. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>beta_distribution</classname> &amp;</paramtype></parameter><description><para>Reads an <computeroutput><classname alt="boost::random::beta_distribution">beta_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  166. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>beta_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>beta_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::beta_distribution">beta_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  167. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>beta_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>beta_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::beta_distribution">beta_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  168. </method-group>
  169. </class>
  170. </namespace>
  171. </namespace>
  172. </header>
  173. <header name="boost/random/binomial_distribution.hpp">
  174. <namespace name="boost">
  175. <namespace name="random">
  176. <class name="binomial_distribution"><template>
  177. <template-type-parameter name="IntType"><default>int</default></template-type-parameter>
  178. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  179. </template><description><para>The binomial distribution is an integer valued distribution with two parameters, <computeroutput>t</computeroutput> and <computeroutput>p</computeroutput>. The values of the distribution are within the range [0,t].</para><para>The distribution function is <inlineequation><alt>$\displaystyle P(k) = {t \choose k}p^k(1-p)^{t-k}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_1.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle P(k) = {t \choose k}p^k(1-p)^{t-k}$</phrase></textobject></inlinemediaobject></inlineequation>.</para><para>The algorithm used is the BTRD algorithm described in</para><para> <blockquote><para> "The generation of binomial random variates", Wolfgang Hormann, Journal of Statistical Computation and Simulation, Volume 46, Issue 1 &amp; 2 April 1993 , pages 101 - 110 </para></blockquote> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>binomial_distribution</classname></type></typedef>
  180. <method-group name="public member functions">
  181. <method name="t" cv="const"><type>IntType</type><description><para>Returns the <computeroutput>t</computeroutput> parameter of the distribution. </para></description></method>
  182. <method name="p" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>p</computeroutput> parameter of the distribution. </para></description></method>
  183. </method-group>
  184. <constructor specifiers="explicit"><parameter name="t"><paramtype>IntType</paramtype><default>1</default></parameter><parameter name="p"><paramtype>RealType</paramtype><default>0.5</default></parameter><description><para>Construct a <classname alt="boost::random::binomial_distribution::param_type">param_type</classname> object. <computeroutput>t</computeroutput> and <computeroutput>p</computeroutput> are the parameters of the distribution.</para><para>Requires: t &gt;=0 &amp;&amp; 0 &lt;= p &lt;= 1 </para></description></constructor>
  185. <method-group name="friend functions">
  186. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  187. <template-type-parameter name="CharT"/>
  188. <template-type-parameter name="Traits"/>
  189. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  190. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  191. <template-type-parameter name="CharT"/>
  192. <template-type-parameter name="Traits"/>
  193. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype><classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  194. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have the same values. </para></description></method>
  195. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have different values. </para></description></method>
  196. </method-group>
  197. </class><typedef name="result_type"><type>IntType</type></typedef>
  198. <typedef name="input_type"><type>RealType</type></typedef>
  199. <method-group name="public member functions">
  200. <method name="operator()" cv="const"><type>IntType</type><template>
  201. <template-type-parameter name="URNG"/>
  202. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the binomial distribution. </para></description></method>
  203. <method name="operator()" cv="const"><type>IntType</type><template>
  204. <template-type-parameter name="URNG"/>
  205. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the binomial distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  206. <method name="t" cv="const"><type>IntType</type><description><para>Returns the <computeroutput>t</computeroutput> parameter of the distribution. </para></description></method>
  207. <method name="p" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>p</computeroutput> parameter of the distribution. </para></description></method>
  208. <method name="min" cv="const"><type>IntType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  209. <method name="max" cv="const"><type>IntType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  210. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  211. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets parameters of the distribution. </para></description></method>
  212. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  213. </method-group>
  214. <constructor specifiers="explicit"><parameter name="t"><paramtype>IntType</paramtype><default>1</default></parameter><parameter name="p"><paramtype>RealType</paramtype><default>0.5</default></parameter><description><para>Construct a <computeroutput><classname alt="boost::random::binomial_distribution">binomial_distribution</classname></computeroutput> object. <computeroutput>t</computeroutput> and <computeroutput>p</computeroutput> are the parameters of the distribution.</para><para>Requires: t &gt;=0 &amp;&amp; 0 &lt;= p &lt;= 1 </para></description></constructor>
  215. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Construct an <computeroutput><classname alt="boost::random::binomial_distribution">binomial_distribution</classname></computeroutput> object from the parameters. </para></description></constructor>
  216. <method-group name="friend functions">
  217. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  218. <template-type-parameter name="CharT"/>
  219. <template-type-parameter name="Traits"/>
  220. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="bd"><paramtype>const <classname>binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  221. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  222. <template-type-parameter name="CharT"/>
  223. <template-type-parameter name="Traits"/>
  224. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="bd"><paramtype><classname>binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  225. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>binomial_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce the same sequence of values, given equal generators. </para></description></method>
  226. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>binomial_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions could produce different sequences of values, given equal generators. </para></description></method>
  227. </method-group>
  228. </class>
  229. </namespace>
  230. </namespace>
  231. </header>
  232. <header name="boost/random/cauchy_distribution.hpp">
  233. <namespace name="boost">
  234. <namespace name="random">
  235. <class name="cauchy_distribution"><template>
  236. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  237. </template><description><para>The cauchy distribution is a continuous distribution with two parameters, median and sigma.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \frac{\sigma}{\pi(\sigma^2 + (x-m)^2)}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_2.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{\sigma}{\pi(\sigma^2 + (x-m)^2)}$</phrase></textobject></inlinemediaobject></inlineequation> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>cauchy_distribution</classname></type></typedef>
  238. <method-group name="public member functions">
  239. <method name="median" cv="const"><type>RealType</type><description><para>Returns the median of the distribution. </para></description></method>
  240. <method name="sigma" cv="const"><type>RealType</type><description><para>Returns the sigma parameter of the distribution. </para></description></method>
  241. <method name="a" cv="const"><type>RealType</type><description><para>Returns the median of the distribution. </para></description></method>
  242. <method name="b" cv="const"><type>RealType</type><description><para>Returns the sigma parameter of the distribution. </para></description></method>
  243. </method-group>
  244. <constructor specifiers="explicit"><parameter name="median"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="sigma"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs the parameters of the cauchy distribution. </para></description></constructor>
  245. <method-group name="friend functions">
  246. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  247. <template-type-parameter name="CharT"/>
  248. <template-type-parameter name="Traits"/>
  249. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a std::ostream. </para></description></method>
  250. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  251. <template-type-parameter name="CharT"/>
  252. <template-type-parameter name="Traits"/>
  253. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a std::istream. </para></description></method>
  254. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  255. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  256. </method-group>
  257. </class><typedef name="input_type"><type>RealType</type></typedef>
  258. <typedef name="result_type"><type>RealType</type></typedef>
  259. <method-group name="public member functions">
  260. <method name="median" cv="const"><type>RealType</type><description><para>Returns: the "median" parameter of the distribution </para></description></method>
  261. <method name="sigma" cv="const"><type>RealType</type><description><para>Returns: the "sigma" parameter of the distribution </para></description></method>
  262. <method name="a" cv="const"><type>RealType</type><description><para>Returns: the "median" parameter of the distribution </para></description></method>
  263. <method name="b" cv="const"><type>RealType</type><description><para>Returns: the "sigma" parameter of the distribution </para></description></method>
  264. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  265. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  266. <method name="param" cv="const"><type><classname>param_type</classname></type></method>
  267. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter></method>
  268. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  269. <method name="operator()"><type>result_type</type><template>
  270. <template-type-parameter name="Engine"/>
  271. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns: A random variate distributed according to the cauchy distribution. </para></description></method>
  272. <method name="operator()"><type>result_type</type><template>
  273. <template-type-parameter name="Engine"/>
  274. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns: A random variate distributed according to the cauchy distribution with parameters specified by param. </para></description></method>
  275. </method-group>
  276. <constructor specifiers="explicit"><parameter name="median"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="sigma"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <classname alt="boost::random::cauchy_distribution">cauchy_distribution</classname> with the paramters <computeroutput>median</computeroutput> and <computeroutput>sigma</computeroutput>. </para></description></constructor>
  277. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::cauchy_distribution">cauchy_distribution</classname> from it's parameters. </para></description></constructor>
  278. <method-group name="friend functions">
  279. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  280. <template-type-parameter name="CharT"/>
  281. <template-type-parameter name="Traits"/>
  282. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="cd"><paramtype>const <classname>cauchy_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  283. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  284. <template-type-parameter name="CharT"/>
  285. <template-type-parameter name="Traits"/>
  286. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="cd"><paramtype>const <classname>cauchy_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  287. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>cauchy_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>cauchy_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values, given equal generators. </para></description></method>
  288. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>cauchy_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>cauchy_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values, given equal generators. </para></description></method>
  289. </method-group>
  290. </class>
  291. </namespace>
  292. </namespace>
  293. </header>
  294. <header name="boost/random/chi_squared_distribution.hpp">
  295. <namespace name="boost">
  296. <namespace name="random">
  297. <class name="chi_squared_distribution"><template>
  298. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  299. </template><description><para>The chi squared distribution is a real valued distribution with one parameter, <computeroutput>n</computeroutput>. The distribution produces values &gt; 0.</para><para>The distribution function is <inlineequation><alt>$\displaystyle P(x) = \frac{x^{(n/2)-1}e^{-x/2}}{\Gamma(n/2)2^{n/2}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_3.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle P(x) = \frac{x^{(n/2)-1}e^{-x/2}}{\Gamma(n/2)2^{n/2}}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>chi_squared_distribution</classname></type></typedef>
  300. <method-group name="public member functions">
  301. <method name="n" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>n</computeroutput> parameter of the distribution. </para></description></method>
  302. </method-group>
  303. <constructor specifiers="explicit"><parameter name="n"><paramtype>RealType</paramtype><default>1</default></parameter><description><para>Construct a <classname alt="boost::random::chi_squared_distribution::param_type">param_type</classname> object. <computeroutput>n</computeroutput> is the parameter of the distribution.</para><para>Requires: t &gt;=0 &amp;&amp; 0 &lt;= p &lt;= 1 </para></description></constructor>
  304. <method-group name="friend functions">
  305. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  306. <template-type-parameter name="CharT"/>
  307. <template-type-parameter name="Traits"/>
  308. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  309. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  310. <template-type-parameter name="CharT"/>
  311. <template-type-parameter name="Traits"/>
  312. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype><classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  313. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have the same values. </para></description></method>
  314. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have different values. </para></description></method>
  315. </method-group>
  316. </class><typedef name="result_type"><type>RealType</type></typedef>
  317. <typedef name="input_type"><type>RealType</type></typedef>
  318. <method-group name="public member functions">
  319. <method name="operator()"><type>RealType</type><template>
  320. <template-type-parameter name="URNG"/>
  321. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the chi squared distribution. </para></description></method>
  322. <method name="operator()" cv="const"><type>RealType</type><template>
  323. <template-type-parameter name="URNG"/>
  324. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the chi squared distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  325. <method name="n" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>n</computeroutput> parameter of the distribution. </para></description></method>
  326. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  327. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  328. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  329. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets parameters of the distribution. </para></description></method>
  330. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  331. </method-group>
  332. <constructor specifiers="explicit"><parameter name="n"><paramtype>RealType</paramtype><default>1</default></parameter><description><para>Construct a <computeroutput><classname alt="boost::random::chi_squared_distribution">chi_squared_distribution</classname></computeroutput> object. <computeroutput>n</computeroutput> is the parameter of the distribution.</para><para>Requires: t &gt;=0 &amp;&amp; 0 &lt;= p &lt;= 1 </para></description></constructor>
  333. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Construct an <computeroutput><classname alt="boost::random::chi_squared_distribution">chi_squared_distribution</classname></computeroutput> object from the parameters. </para></description></constructor>
  334. <method-group name="friend functions">
  335. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  336. <template-type-parameter name="CharT"/>
  337. <template-type-parameter name="Traits"/>
  338. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="c2d"><paramtype>const <classname>chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  339. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  340. <template-type-parameter name="CharT"/>
  341. <template-type-parameter name="Traits"/>
  342. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="c2d"><paramtype><classname>chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  343. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>chi_squared_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce the same sequence of values, given equal generators. </para></description></method>
  344. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>chi_squared_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions could produce different sequences of values, given equal generators. </para></description></method>
  345. </method-group>
  346. </class>
  347. </namespace>
  348. </namespace>
  349. </header>
  350. <header name="boost/random/discard_block.hpp">
  351. <namespace name="boost">
  352. <namespace name="random">
  353. <class name="discard_block_engine"><template>
  354. <template-type-parameter name="UniformRandomNumberGenerator"/>
  355. <template-nontype-parameter name="p"><type>std::size_t</type></template-nontype-parameter>
  356. <template-nontype-parameter name="r"><type>std::size_t</type></template-nontype-parameter>
  357. </template><description><para>The class template <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> is a model of <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It modifies another generator by discarding parts of its output. Out of every block of <computeroutput>p</computeroutput> results, the first <computeroutput>r</computeroutput> will be returned and the rest discarded.</para><para>Requires: 0 &lt; p &lt;= r </para></description><typedef name="base_type"><type>UniformRandomNumberGenerator</type></typedef>
  358. <typedef name="result_type"><type>base_type::result_type</type></typedef>
  359. <data-member name="block_size" specifiers="static"><type>const std::size_t</type></data-member>
  360. <data-member name="used_block" specifiers="static"><type>const std::size_t</type></data-member>
  361. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  362. <data-member name="total_block" specifiers="static"><type>const std::size_t</type></data-member>
  363. <data-member name="returned_block" specifiers="static"><type>const std::size_t</type></data-member>
  364. <method-group name="public member functions">
  365. <method name="seed"><type>void</type><description><para>default seeds the underlying generator. </para></description></method>
  366. <method name="seed"><type>void</type><parameter name="s"><paramtype>seed_type</paramtype></parameter><description><para>Seeds the underlying generator with s. </para></description></method>
  367. <method name="seed"><type>void</type><template>
  368. <template-type-parameter name="SeedSeq"/>
  369. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds the underlying generator with seq. </para></description></method>
  370. <method name="seed"><type>void</type><template>
  371. <template-type-parameter name="It"/>
  372. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds the underlying generator with first and last. </para></description></method>
  373. <method name="base" cv="const"><type>const base_type &amp;</type><description><para>Returns the underlying engine. </para></description></method>
  374. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  375. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter></method>
  376. <method name="generate"><type>void</type><template>
  377. <template-type-parameter name="It"/>
  378. </template><parameter name="first"><paramtype>It</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter></method>
  379. </method-group>
  380. <constructor><description><para>Uses the default seed for the base generator. </para></description></constructor>
  381. <constructor specifiers="explicit"><parameter name="rng"><paramtype>const base_type &amp;</paramtype></parameter><description><para>Constructs a new <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> with a copy of rng. </para></description></constructor>
  382. <constructor specifiers="explicit"><parameter name="rng"><paramtype>base_type &amp;&amp;</paramtype></parameter><description><para>Constructs a new <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> with rng. </para></description></constructor>
  383. <constructor specifiers="explicit"><parameter name="value"><paramtype>seed_type</paramtype></parameter><description><para>Creates a new <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> and seeds the underlying generator with <computeroutput>value</computeroutput> </para></description></constructor>
  384. <constructor specifiers="explicit"><template>
  385. <template-type-parameter name="SeedSeq"/>
  386. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Creates a new <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> and seeds the underlying generator with <computeroutput>seq</computeroutput> </para></description></constructor>
  387. <constructor><template>
  388. <template-type-parameter name="It"/>
  389. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Creates a new <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> and seeds the underlying generator with first and last. </para></description></constructor>
  390. <method-group name="public static functions">
  391. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. This is the same as the minimum of the underlying generator. </para></description></method>
  392. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. This is the same as the maximum of the underlying generator. </para></description></method>
  393. </method-group>
  394. <method-group name="friend functions">
  395. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  396. <template-type-parameter name="CharT"/>
  397. <template-type-parameter name="Traits"/>
  398. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>discard_block_engine</classname> &amp;</paramtype></parameter><description><para>Writes a <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  399. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  400. <template-type-parameter name="CharT"/>
  401. <template-type-parameter name="Traits"/>
  402. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype><classname>discard_block_engine</classname> &amp;</paramtype></parameter><description><para>Reads a <classname alt="boost::random::discard_block_engine">discard_block_engine</classname> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  403. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>discard_block_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>discard_block_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences. </para></description></method>
  404. <method name="operator!="><type>friend bool</type><parameter name="x"><paramtype>const <classname>discard_block_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>discard_block_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences. </para></description></method>
  405. </method-group>
  406. </class>
  407. </namespace>
  408. </namespace>
  409. </header>
  410. <header name="boost/random/discrete_distribution.hpp">
  411. <namespace name="boost">
  412. <namespace name="random">
  413. <class name="discrete_distribution"><template>
  414. <template-type-parameter name="IntType"><default>int</default></template-type-parameter>
  415. <template-type-parameter name="WeightType"><default>double</default></template-type-parameter>
  416. </template><description><para>The class <computeroutput><classname alt="boost::random::discrete_distribution">discrete_distribution</classname></computeroutput> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . It produces integers in the range [0, n) with the probability of producing each value is specified by the parameters of the distribution. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>discrete_distribution</classname></type></typedef>
  417. <method-group name="public member functions">
  418. <method name="probabilities" cv="const"><type>std::vector&lt; WeightType &gt;</type><description><para>Returns a vector containing the probabilities of each possible value of the distribution. </para></description></method>
  419. </method-group>
  420. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::discrete_distribution::param_type">param_type</classname></computeroutput> object, representing a distribution with <inlineequation><alt>$p(0) = 1$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_4.png"/></imageobject><textobject role="tex"><phrase>$p(0) = 1$</phrase></textobject></inlinemediaobject></inlineequation> and <inlineequation><alt>$p(k|k&gt;0) = 0$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_9.png"/></imageobject><textobject role="tex"><phrase>$p(k|k&gt;0) = 0$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description></constructor>
  421. <constructor><template>
  422. <template-type-parameter name="Iter"/>
  423. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>If <computeroutput>first</computeroutput> == <computeroutput>last</computeroutput>, equivalent to the default constructor. Otherwise, the values of the range represent weights for the possible values of the distribution. </para></description></constructor>
  424. <constructor><parameter name="wl"><paramtype>const std::initializer_list&lt; WeightType &gt; &amp;</paramtype></parameter><description><para>If wl.size() == 0, equivalent to the default constructor. Otherwise, the values of the <computeroutput>initializer_list</computeroutput> represent weights for the possible values of the distribution. </para></description></constructor>
  425. <constructor specifiers="explicit"><template>
  426. <template-type-parameter name="Range"/>
  427. </template><parameter name="range"><paramtype>const Range &amp;</paramtype></parameter><description><para>If the range is empty, equivalent to the default constructor. Otherwise, the elements of the range represent weights for the possible values of the distribution. </para></description></constructor>
  428. <constructor><template>
  429. <template-type-parameter name="Func"/>
  430. </template><parameter name="nw"><paramtype>std::size_t</paramtype></parameter><parameter name="xmin"><paramtype>double</paramtype></parameter><parameter name="xmax"><paramtype>double</paramtype></parameter><parameter name="fw"><paramtype>Func</paramtype></parameter><description><para>If nw is zero, equivalent to the default constructor. Otherwise, the range of the distribution is [0, nw), and the weights are found by calling fw with values evenly distributed between <inlineequation><alt>$\mbox{xmin} + \delta/2$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_6.png"/></imageobject><textobject role="tex"><phrase>$\mbox{xmin} + \delta/2$</phrase></textobject></inlinemediaobject></inlineequation> and <inlineequation><alt>$\mbox{xmax} - \delta/2$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_7.png"/></imageobject><textobject role="tex"><phrase>$\mbox{xmax} - \delta/2$</phrase></textobject></inlinemediaobject></inlineequation>, where <inlineequation><alt>$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_8.png"/></imageobject><textobject role="tex"><phrase>$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description></constructor>
  431. <method-group name="friend functions">
  432. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  433. <template-type-parameter name="CharT"/>
  434. <template-type-parameter name="Traits"/>
  435. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  436. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  437. <template-type-parameter name="CharT"/>
  438. <template-type-parameter name="Traits"/>
  439. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  440. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  441. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  442. </method-group>
  443. </class><typedef name="input_type"><type>WeightType</type></typedef>
  444. <typedef name="result_type"><type>IntType</type></typedef>
  445. <method-group name="public member functions">
  446. <method name="operator()" cv="const"><type>IntType</type><template>
  447. <template-type-parameter name="URNG"/>
  448. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a value distributed according to the parameters of the <classname alt="boost::random::discrete_distribution">discrete_distribution</classname>. </para></description></method>
  449. <method name="operator()" cv="const"><type>IntType</type><template>
  450. <template-type-parameter name="URNG"/>
  451. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a value distributed according to the parameters specified by param. </para></description></method>
  452. <method name="min" cv="const"><type>result_type</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  453. <method name="max" cv="const"><type>result_type</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  454. <method name="probabilities" cv="const"><type>std::vector&lt; WeightType &gt;</type><description><para>Returns a vector containing the probabilities of each value of the distribution. For example, given</para><para><programlisting language="c++">discrete_distribution&lt;&gt; dist = { 1, 4, 5 };
  455. std::vector&lt;double&gt; p = dist.param();
  456. </programlisting></para><para>the vector, p will contain {0.1, 0.4, 0.5}.</para><para>If <computeroutput>WeightType</computeroutput> is integral, then the weights will be returned unchanged. </para></description></method>
  457. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  458. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  459. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  460. </method-group>
  461. <constructor><description><para>Creates a new <computeroutput><classname alt="boost::random::discrete_distribution">discrete_distribution</classname></computeroutput> object that has <inlineequation><alt>$p(0) = 1$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_4.png"/></imageobject><textobject role="tex"><phrase>$p(0) = 1$</phrase></textobject></inlinemediaobject></inlineequation> and <inlineequation><alt>$p(i|i&gt;0) = 0$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_5.png"/></imageobject><textobject role="tex"><phrase>$p(i|i&gt;0) = 0$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description></constructor>
  462. <constructor><template>
  463. <template-type-parameter name="Iter"/>
  464. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::discrete_distribution">discrete_distribution</classname> from an iterator range. If <computeroutput>first</computeroutput> == <computeroutput>last</computeroutput>, equivalent to the default constructor. Otherwise, the values of the range represent weights for the possible values of the distribution. </para></description></constructor>
  465. <constructor><parameter name="wl"><paramtype>std::initializer_list&lt; WeightType &gt;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::discrete_distribution">discrete_distribution</classname></computeroutput> from a <computeroutput>std::initializer_list</computeroutput>. If the <computeroutput>initializer_list</computeroutput> is empty, equivalent to the default constructor. Otherwise, the values of the <computeroutput>initializer_list</computeroutput> represent weights for the possible values of the distribution. For example, given the distribution</para><para><programlisting language="c++">discrete_distribution&lt;&gt; dist{1, 4, 5};
  466. </programlisting></para><para>The probability of a 0 is 1/10, the probability of a 1 is 2/5, the probability of a 2 is 1/2, and no other values are possible. </para></description></constructor>
  467. <constructor specifiers="explicit"><template>
  468. <template-type-parameter name="Range"/>
  469. </template><parameter name="range"><paramtype>const Range &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::discrete_distribution">discrete_distribution</classname> from a Boost.Range range. If the range is empty, equivalent to the default constructor. Otherwise, the values of the range represent weights for the possible values of the distribution. </para></description></constructor>
  470. <constructor><template>
  471. <template-type-parameter name="Func"/>
  472. </template><parameter name="nw"><paramtype>std::size_t</paramtype></parameter><parameter name="xmin"><paramtype>double</paramtype></parameter><parameter name="xmax"><paramtype>double</paramtype></parameter><parameter name="fw"><paramtype>Func</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::discrete_distribution">discrete_distribution</classname> that approximates a function. If nw is zero, equivalent to the default constructor. Otherwise, the range of the distribution is [0, nw), and the weights are found by calling fw with values evenly distributed between <inlineequation><alt>$\mbox{xmin} + \delta/2$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_6.png"/></imageobject><textobject role="tex"><phrase>$\mbox{xmin} + \delta/2$</phrase></textobject></inlinemediaobject></inlineequation> and <inlineequation><alt>$\mbox{xmax} - \delta/2$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_7.png"/></imageobject><textobject role="tex"><phrase>$\mbox{xmax} - \delta/2$</phrase></textobject></inlinemediaobject></inlineequation>, where <inlineequation><alt>$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_8.png"/></imageobject><textobject role="tex"><phrase>$\delta = (\mbox{xmax} - \mbox{xmin})/\mbox{nw}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description></constructor>
  473. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::discrete_distribution">discrete_distribution</classname> from its parameters. </para></description></constructor>
  474. <method-group name="friend functions">
  475. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  476. <template-type-parameter name="CharT"/>
  477. <template-type-parameter name="Traits"/>
  478. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="dd"><paramtype>const <classname>discrete_distribution</classname> &amp;</paramtype></parameter><description><para>Writes a distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  479. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  480. <template-type-parameter name="CharT"/>
  481. <template-type-parameter name="Traits"/>
  482. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="dd"><paramtype>const <classname>discrete_distribution</classname> &amp;</paramtype></parameter><description><para>Reads a distribution from a <computeroutput>std::istream</computeroutput> </para></description></method>
  483. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>discrete_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>discrete_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will return the same sequence of values, when passed equal generators. </para></description></method>
  484. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>discrete_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>discrete_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may return different sequences of values, when passed equal generators. </para></description></method>
  485. </method-group>
  486. </class>
  487. </namespace>
  488. </namespace>
  489. </header>
  490. <header name="boost/random/exponential_distribution.hpp">
  491. <namespace name="boost">
  492. <namespace name="random">
  493. <class name="exponential_distribution"><template>
  494. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  495. </template><description><para>The exponential distribution is a model of <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> with a single parameter lambda.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \lambda e^{-\lambda x}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_10.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \lambda e^{-\lambda x}$</phrase></textobject></inlinemediaobject></inlineequation></para><para>The implementation uses the "ziggurat" algorithm, as described in</para><para> <blockquote><para> "The Ziggurat Method for Generating Random Variables", George Marsaglia and Wai Wan Tsang, Journal of Statistical Software Volume 5, Number 8 (2000), 1-7. </para></blockquote> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>exponential_distribution</classname></type></typedef>
  496. <method-group name="public member functions">
  497. <method name="lambda" cv="const"><type>RealType</type><description><para>Returns the lambda parameter of the distribution. </para></description></method>
  498. </method-group>
  499. <constructor><parameter name="lambda"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs parameters with a given lambda.</para><para>Requires: lambda &gt; 0 </para></description></constructor>
  500. <method-group name="friend functions">
  501. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  502. <template-type-parameter name="CharT"/>
  503. <template-type-parameter name="Traits"/>
  504. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  505. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  506. <template-type-parameter name="CharT"/>
  507. <template-type-parameter name="Traits"/>
  508. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  509. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  510. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  511. </method-group>
  512. </class><typedef name="input_type"><type>RealType</type></typedef>
  513. <typedef name="result_type"><type>RealType</type></typedef>
  514. <method-group name="public member functions">
  515. <method name="lambda" cv="const"><type>RealType</type><description><para>Returns the lambda parameter of the distribution. </para></description></method>
  516. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  517. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  518. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  519. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  520. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  521. <method name="operator()" cv="const"><type>result_type</type><template>
  522. <template-type-parameter name="Engine"/>
  523. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the exponential distribution. </para></description></method>
  524. <method name="operator()" cv="const"><type>result_type</type><template>
  525. <template-type-parameter name="Engine"/>
  526. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the exponential distribution with parameters specified by param. </para></description></method>
  527. </method-group>
  528. <constructor specifiers="explicit"><parameter name="lambda"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs an <classname alt="boost::random::exponential_distribution">exponential_distribution</classname> with a given lambda.</para><para>Requires: lambda &gt; 0 </para></description></constructor>
  529. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs an <classname alt="boost::random::exponential_distribution">exponential_distribution</classname> from its parameters </para></description></constructor>
  530. <method-group name="friend functions">
  531. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  532. <template-type-parameter name="CharT"/>
  533. <template-type-parameter name="Traits"/>
  534. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ed"><paramtype>const <classname>exponential_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a std::ostream. </para></description></method>
  535. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  536. <template-type-parameter name="CharT"/>
  537. <template-type-parameter name="Traits"/>
  538. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ed"><paramtype>const <classname>exponential_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a std::istream. </para></description></method>
  539. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>exponential_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>exponential_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true iff the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  540. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>exponential_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>exponential_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true iff the two distributions will produce different sequences of values given equal generators. </para></description></method>
  541. </method-group>
  542. </class>
  543. </namespace>
  544. </namespace>
  545. </header>
  546. <header name="boost/random/extreme_value_distribution.hpp">
  547. <namespace name="boost">
  548. <namespace name="random">
  549. <class name="extreme_value_distribution"><template>
  550. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  551. </template><description><para>The extreme value distribution is a real valued distribution with two parameters a and b.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \frac{1}{b}e^{\frac{a-x}{b} - e^\frac{a-x}{b}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_11.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{1}{b}e^{\frac{a-x}{b} - e^\frac{a-x}{b}}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>extreme_value_distribution</classname></type></typedef>
  552. <method-group name="public member functions">
  553. <method name="a" cv="const"><type>RealType</type><description><para>Returns the "a" parameter of the distribtuion. </para></description></method>
  554. <method name="b" cv="const"><type>RealType</type><description><para>Returns the "b" parameter of the distribution. </para></description></method>
  555. </method-group>
  556. <constructor specifiers="explicit"><parameter name="a"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="b"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::extreme_value_distribution::param_type">param_type</classname></computeroutput> from the "a" and "b" parameters of the distribution.</para><para>Requires: b &gt; 0 </para></description></constructor>
  557. <method-group name="friend functions">
  558. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  559. <template-type-parameter name="CharT"/>
  560. <template-type-parameter name="Traits"/>
  561. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::extreme_value_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  562. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  563. <template-type-parameter name="CharT"/>
  564. <template-type-parameter name="Traits"/>
  565. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::extreme_value_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  566. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  567. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  568. </method-group>
  569. </class><typedef name="result_type"><type>RealType</type></typedef>
  570. <typedef name="input_type"><type>RealType</type></typedef>
  571. <method-group name="public member functions">
  572. <method name="operator()" cv="const"><type>RealType</type><template>
  573. <template-type-parameter name="URNG"/>
  574. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the <computeroutput><classname alt="boost::random::extreme_value_distribution">extreme_value_distribution</classname></computeroutput>. </para></description></method>
  575. <method name="operator()" cv="const"><type>RealType</type><template>
  576. <template-type-parameter name="URNG"/>
  577. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed accordint to the extreme value distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  578. <method name="a" cv="const"><type>RealType</type><description><para>Returns the "a" parameter of the distribution. </para></description></method>
  579. <method name="b" cv="const"><type>RealType</type><description><para>Returns the "b" parameter of the distribution. </para></description></method>
  580. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  581. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  582. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  583. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  584. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  585. </method-group>
  586. <constructor specifiers="explicit"><parameter name="a"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="b"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::extreme_value_distribution">extreme_value_distribution</classname></computeroutput> from its "a" and "b" parameters.</para><para>Requires: b &gt; 0 </para></description></constructor>
  587. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::extreme_value_distribution">extreme_value_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  588. <method-group name="friend functions">
  589. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  590. <template-type-parameter name="CharT"/>
  591. <template-type-parameter name="Traits"/>
  592. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>extreme_value_distribution</classname> &amp;</paramtype></parameter><description><para>Writes an <computeroutput><classname alt="boost::random::extreme_value_distribution">extreme_value_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  593. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  594. <template-type-parameter name="CharT"/>
  595. <template-type-parameter name="Traits"/>
  596. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>extreme_value_distribution</classname> &amp;</paramtype></parameter><description><para>Reads an <computeroutput><classname alt="boost::random::extreme_value_distribution">extreme_value_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  597. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>extreme_value_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>extreme_value_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::extreme_value_distribution">extreme_value_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  598. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>extreme_value_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>extreme_value_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::extreme_value_distribution">extreme_value_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  599. </method-group>
  600. </class>
  601. </namespace>
  602. </namespace>
  603. </header>
  604. <header name="boost/random/faure.hpp">
  605. <namespace name="boost">
  606. <namespace name="random">
  607. <class name="faure_engine"><template>
  608. <template-type-parameter name="RealType"/>
  609. <template-type-parameter name="SeqSizeT"/>
  610. <template-type-parameter name="PrimeTable"><default>default_faure_prime_table</default></template-type-parameter>
  611. </template><description><para>Instantiations of class template <classname alt="boost::random::faure_engine">faure_engine</classname> model a <link linkend="boost_random.reference.concepts.quasi_random_number_generator">quasi-random number generator</link> . The <classname alt="boost::random::faure_engine">faure_engine</classname> uses the algorithm described in <blockquote><para> Henri Faure, Discrepance de suites associees a un systeme de numeration (en dimension s), Acta Arithmetica, Volume 41, 1982, pages 337-351. </para></blockquote> <blockquote><para> Bennett Fox, Algorithm 647: Implementation and Relative Efficiency of Quasirandom Sequence Generators, ACM Transactions on Mathematical Software, Volume 12, Number 4, December 1986, pages 362-376. </para></blockquote> </para><para>In the following documentation <computeroutput>X</computeroutput> denotes the concrete class of the template <classname alt="boost::random::faure_engine">faure_engine</classname> returning objects of type <computeroutput>RealType</computeroutput>, u and v are the values of <computeroutput>X</computeroutput>.</para><para>Some member functions may throw exceptions of type <computeroutput>std::bad_alloc</computeroutput>. </para></description><typedef name="result_type"><type>RealType</type></typedef>
  612. <method-group name="friend functions">
  613. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>faure_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>faure_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of outputs. </para></description></method>
  614. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>faure_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>faure_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of outputs. </para></description></method>
  615. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  616. <template-type-parameter name="CharT"/>
  617. <template-type-parameter name="Traits"/>
  618. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>faure_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  619. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  620. <template-type-parameter name="CharT"/>
  621. <template-type-parameter name="Traits"/>
  622. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>faure_engine</classname> &amp;</paramtype></parameter><description><para>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  623. </method-group>
  624. <method-group name="public static functions">
  625. <method name="min" specifiers="static"><type>constexpr result_type</type><description><para>Returns: Tight lower bound on the set of values returned by operator().</para><para>Throws: nothing. </para></description></method>
  626. <method name="max" specifiers="static"><type>constexpr result_type</type><description><para>Returns: Tight upper bound on the set of values returned by operator().</para><para>Throws: nothing. </para></description></method>
  627. </method-group>
  628. <method-group name="public member functions">
  629. <method name="seed"><type>void</type><parameter name="init"><paramtype>SeqSizeT</paramtype><default>0</default></parameter><description><para>Effects: Effectively sets the quasi-random number generator state to the <computeroutput>init</computeroutput>-th vector in the <computeroutput>s</computeroutput>-dimensional quasi-random domain, where <computeroutput>s</computeroutput> == X::dimension(). <programlisting language="c++">X u, v;
  630. for(int i = 0; i &lt; N; ++i)
  631. for( std::size_t j = 0; j &lt; u.dimension(); ++j )
  632. u();
  633. v.seed(N);
  634. assert(u() == v());
  635. </programlisting> Throws: bad_alloc. </para></description></method>
  636. <method name="dimension" cv="const"><type>std::size_t</type><description><para>Returns: The dimension of of the quasi-random domain.</para><para>Throws: nothing. </para></description></method>
  637. <method name="operator()"><type>result_type</type><description><para>Returns: Returns a successive element of an <computeroutput>s</computeroutput>-dimensional (s = X::dimension()) vector at each invocation. When all elements are exhausted, X::operator() begins anew with the starting element of a subsequent <computeroutput>s</computeroutput>-dimensional vector.</para><para>Throws: range_error. </para></description></method>
  638. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Effects: Advances *this state as if <computeroutput>z</computeroutput> consecutive X::operator() invocations were executed. <programlisting language="c++">X u = v;
  639. for(int i = 0; i &lt; N; ++i)
  640. u();
  641. v.discard(N);
  642. assert(u() == v());
  643. </programlisting></para><para>Throws: range_error. Throws: bad_alloc. </para></description></method>
  644. </method-group>
  645. <constructor specifiers="explicit"><parameter name="s"><paramtype>std::size_t</paramtype></parameter><description><para>Effects: Constructs the <computeroutput>s</computeroutput>-dimensional default Faure quasi-random number generator.</para><para>Throws: bad_alloc, invalid_argument. </para></description></constructor>
  646. </class><typedef name="faure"><description><para><note><para>This specialization of <classname alt="boost::random::faure_engine">faure_engine</classname> supports up to 1117 dimensions.</para>
  647. </note>
  648. However, it is possible to provide your own prime table to <classname alt="boost::random::faure_engine">faure_engine</classname> should the default one be insufficient. </para></description><type><classname>faure_engine</classname>&lt; double, boost::uint_least64_t, default_faure_prime_table &gt;</type></typedef>
  649. </namespace>
  650. </namespace>
  651. </header>
  652. <header name="boost/random/fisher_f_distribution.hpp">
  653. <namespace name="boost">
  654. <namespace name="random">
  655. <class name="fisher_f_distribution"><template>
  656. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  657. </template><description><para>The Fisher F distribution is a real valued distribution with two parameters m and n.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \frac{\Gamma((m+n)/2)}{\Gamma(m/2)\Gamma(n/2)} \left(\frac{m}{n}\right)^{m/2} x^{(m/2)-1} \left(1+\frac{mx}{n}\right)^{-(m+n)/2} $</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_12.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{\Gamma((m+n)/2)}{\Gamma(m/2)\Gamma(n/2)} \left(\frac{m}{n}\right)^{m/2} x^{(m/2)-1} \left(1+\frac{mx}{n}\right)^{-(m+n)/2} $</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>fisher_f_distribution</classname></type></typedef>
  658. <method-group name="public member functions">
  659. <method name="m" cv="const"><type>RealType</type><description><para>Returns the "m" parameter of the distribtuion. </para></description></method>
  660. <method name="n" cv="const"><type>RealType</type><description><para>Returns the "n" parameter of the distribution. </para></description></method>
  661. </method-group>
  662. <constructor specifiers="explicit"><parameter name="m"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="n"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::fisher_f_distribution::param_type">param_type</classname></computeroutput> from the "m" and "n" parameters of the distribution.</para><para>Requires: m &gt; 0 and n &gt; 0 </para></description></constructor>
  663. <method-group name="friend functions">
  664. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  665. <template-type-parameter name="CharT"/>
  666. <template-type-parameter name="Traits"/>
  667. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::fisher_f_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  668. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  669. <template-type-parameter name="CharT"/>
  670. <template-type-parameter name="Traits"/>
  671. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::fisher_f_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  672. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  673. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  674. </method-group>
  675. </class><typedef name="result_type"><type>RealType</type></typedef>
  676. <typedef name="input_type"><type>RealType</type></typedef>
  677. <method-group name="public member functions">
  678. <method name="operator()"><type>RealType</type><template>
  679. <template-type-parameter name="URNG"/>
  680. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the F distribution. </para></description></method>
  681. <method name="operator()" cv="const"><type>RealType</type><template>
  682. <template-type-parameter name="URNG"/>
  683. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the F distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  684. <method name="m" cv="const"><type>RealType</type><description><para>Returns the "m" parameter of the distribution. </para></description></method>
  685. <method name="n" cv="const"><type>RealType</type><description><para>Returns the "n" parameter of the distribution. </para></description></method>
  686. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  687. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  688. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  689. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  690. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  691. </method-group>
  692. <constructor specifiers="explicit"><parameter name="m"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="n"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::fisher_f_distribution">fisher_f_distribution</classname></computeroutput> from its "m" and "n" parameters.</para><para>Requires: m &gt; 0 and n &gt; 0 </para></description></constructor>
  693. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::fisher_f_distribution">fisher_f_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  694. <method-group name="friend functions">
  695. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  696. <template-type-parameter name="CharT"/>
  697. <template-type-parameter name="Traits"/>
  698. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="fd"><paramtype>const <classname>fisher_f_distribution</classname> &amp;</paramtype></parameter><description><para>Writes an <computeroutput><classname alt="boost::random::fisher_f_distribution">fisher_f_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  699. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  700. <template-type-parameter name="CharT"/>
  701. <template-type-parameter name="Traits"/>
  702. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="fd"><paramtype>const <classname>fisher_f_distribution</classname> &amp;</paramtype></parameter><description><para>Reads an <computeroutput><classname alt="boost::random::fisher_f_distribution">fisher_f_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  703. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>fisher_f_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>fisher_f_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::fisher_f_distribution">fisher_f_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  704. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>fisher_f_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>fisher_f_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::fisher_f_distribution">fisher_f_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  705. </method-group>
  706. </class>
  707. </namespace>
  708. </namespace>
  709. </header>
  710. <header name="boost/random/gamma_distribution.hpp">
  711. <namespace name="boost">
  712. <namespace name="random">
  713. <class name="gamma_distribution"><template>
  714. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  715. </template><description><para>The gamma distribution is a continuous distribution with two parameters alpha and beta. It produces values &gt; 0.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = x^{\alpha-1}\frac{e^{-x/\beta}}{\beta^\alpha\Gamma(\alpha)}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_13.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = x^{\alpha-1}\frac{e^{-x/\beta}}{\beta^\alpha\Gamma(\alpha)}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>gamma_distribution</classname></type></typedef>
  716. <method-group name="public member functions">
  717. <method name="alpha" cv="const"><type>RealType</type><description><para>Returns the "alpha" parameter of the distribution. </para></description></method>
  718. <method name="beta" cv="const"><type>RealType</type><description><para>Returns the "beta" parameter of the distribution. </para></description></method>
  719. </method-group>
  720. <constructor><parameter name="alpha"><paramtype>const RealType &amp;</paramtype><default>1.0</default></parameter><parameter name="beta"><paramtype>const RealType &amp;</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::gamma_distribution::param_type">param_type</classname></computeroutput> object from the "alpha" and "beta" parameters.</para><para>Requires: alpha &gt; 0 &amp;&amp; beta &gt; 0 </para></description></constructor>
  721. <method-group name="friend functions">
  722. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  723. <template-type-parameter name="CharT"/>
  724. <template-type-parameter name="Traits"/>
  725. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  726. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  727. <template-type-parameter name="CharT"/>
  728. <template-type-parameter name="Traits"/>
  729. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype><classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  730. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  731. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets fo parameters are different. </para></description></method>
  732. </method-group>
  733. </class><typedef name="input_type"><type>RealType</type></typedef>
  734. <typedef name="result_type"><type>RealType</type></typedef>
  735. <method-group name="public member functions">
  736. <method name="alpha" cv="const"><type>RealType</type><description><para>Returns the "alpha" paramter of the distribution. </para></description></method>
  737. <method name="beta" cv="const"><type>RealType</type><description><para>Returns the "beta" parameter of the distribution. </para></description></method>
  738. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  739. <method name="max" cv="const"><type>RealType</type></method>
  740. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  741. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  742. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  743. <method name="operator()"><type>result_type</type><template>
  744. <template-type-parameter name="Engine"/>
  745. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the gamma distribution. </para></description></method>
  746. <method name="operator()" cv="const"><type>RealType</type><template>
  747. <template-type-parameter name="URNG"/>
  748. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter></method>
  749. </method-group>
  750. <constructor specifiers="explicit"><parameter name="alpha"><paramtype>const result_type &amp;</paramtype><default>1.0</default></parameter><parameter name="beta"><paramtype>const result_type &amp;</paramtype><default>1.0</default></parameter><description><para>Creates a new <classname alt="boost::random::gamma_distribution">gamma_distribution</classname> with parameters "alpha" and "beta".</para><para>Requires: alpha &gt; 0 &amp;&amp; beta &gt; 0 </para></description></constructor>
  751. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::gamma_distribution">gamma_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  752. <method-group name="friend functions">
  753. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  754. <template-type-parameter name="CharT"/>
  755. <template-type-parameter name="Traits"/>
  756. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="gd"><paramtype>const <classname>gamma_distribution</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::gamma_distribution">gamma_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  757. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  758. <template-type-parameter name="CharT"/>
  759. <template-type-parameter name="Traits"/>
  760. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="gd"><paramtype><classname>gamma_distribution</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::gamma_distribution">gamma_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  761. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>gamma_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>gamma_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of random variates given equal generators. </para></description></method>
  762. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>gamma_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>gamma_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions can produce different sequences of random variates, given equal generators. </para></description></method>
  763. </method-group>
  764. </class>
  765. </namespace>
  766. </namespace>
  767. </header>
  768. <header name="boost/random/generate_canonical.hpp">
  769. <namespace name="boost">
  770. <namespace name="random">
  771. <function name="generate_canonical"><type>RealType</type><template>
  772. <template-type-parameter name="RealType"/>
  773. <template-nontype-parameter name="bits"><type>std::size_t</type></template-nontype-parameter>
  774. <template-type-parameter name="URNG"/>
  775. </template><parameter name="g"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a value uniformly distributed in the range [0, 1) with at least <computeroutput>bits</computeroutput> random bits. </para></description></function>
  776. </namespace>
  777. </namespace>
  778. </header>
  779. <header name="boost/random/geometric_distribution.hpp">
  780. <namespace name="boost">
  781. <namespace name="random">
  782. <class name="geometric_distribution"><template>
  783. <template-type-parameter name="IntType"><default>int</default></template-type-parameter>
  784. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  785. </template><description><para>An instantiation of the class template <computeroutput><classname alt="boost::random::geometric_distribution">geometric_distribution</classname></computeroutput> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . The distribution produces positive integers which are the number of bernoulli trials with probability <computeroutput>p</computeroutput> required to get one that fails.</para><para>For the geometric distribution, <inlineequation><alt>$p(i) = p(1-p)^{i}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_14.png"/></imageobject><textobject role="tex"><phrase>$p(i) = p(1-p)^{i}$</phrase></textobject></inlinemediaobject></inlineequation>.</para><para> <warning><para> This distribution has been updated to match the C++ standard. Its behavior has changed from the original boost::geometric_distribution. A backwards compatible wrapper is provided in namespace boost. </para></warning> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>geometric_distribution</classname></type></typedef>
  786. <method-group name="public member functions">
  787. <method name="p" cv="const"><type>RealType</type><description><para>Returns the p parameter of the distribution. </para></description></method>
  788. </method-group>
  789. <constructor specifiers="explicit"><parameter name="p"><paramtype>RealType</paramtype><default>0.5</default></parameter><description><para>Constructs the parameters with p. </para></description></constructor>
  790. <method-group name="friend functions">
  791. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  792. <template-type-parameter name="CharT"/>
  793. <template-type-parameter name="Traits"/>
  794. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a std::ostream. </para></description></method>
  795. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  796. <template-type-parameter name="CharT"/>
  797. <template-type-parameter name="Traits"/>
  798. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a std::istream. </para></description></method>
  799. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  800. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  801. </method-group>
  802. </class><typedef name="input_type"><type>RealType</type></typedef>
  803. <typedef name="result_type"><type>IntType</type></typedef>
  804. <method-group name="public member functions">
  805. <method name="p" cv="const"><type>RealType</type><description><para>Returns: the distribution parameter <computeroutput>p</computeroutput> </para></description></method>
  806. <method name="min" cv="const"><type>IntType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  807. <method name="max" cv="const"><type>IntType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  808. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  809. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  810. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  811. <method name="operator()" cv="const"><type>result_type</type><template>
  812. <template-type-parameter name="Engine"/>
  813. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the <classname alt="boost::random::geometric_distribution">geometric_distribution</classname>. </para></description></method>
  814. <method name="operator()" cv="const"><type>result_type</type><template>
  815. <template-type-parameter name="Engine"/>
  816. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the geometric distribution with parameters specified by param. </para></description></method>
  817. </method-group>
  818. <constructor specifiers="explicit"><parameter name="p"><paramtype>const RealType &amp;</paramtype><default>0.5</default></parameter><description><para>Contructs a new <classname alt="boost::random::geometric_distribution">geometric_distribution</classname> with the paramter <computeroutput>p</computeroutput>.</para><para>Requires: 0 &lt; p &lt; 1 </para></description></constructor>
  819. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a new <classname alt="boost::random::geometric_distribution">geometric_distribution</classname> from its parameters. </para></description></constructor>
  820. <method-group name="friend functions">
  821. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  822. <template-type-parameter name="CharT"/>
  823. <template-type-parameter name="Traits"/>
  824. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="gd"><paramtype>const <classname>geometric_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  825. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  826. <template-type-parameter name="CharT"/>
  827. <template-type-parameter name="Traits"/>
  828. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="gd"><paramtype>const <classname>geometric_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  829. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>geometric_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>geometric_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  830. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>geometric_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>geometric_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values given equal generators. </para></description></method>
  831. </method-group>
  832. </class>
  833. </namespace>
  834. </namespace>
  835. </header>
  836. <header name="boost/random/hyperexponential_distribution.hpp">
  837. <namespace name="boost">
  838. <namespace name="random">
  839. <class name="hyperexponential_distribution"><template>
  840. <template-type-parameter name="RealT"><default>double</default></template-type-parameter>
  841. </template><description><para>The hyperexponential distribution is a real-valued continuous distribution with two parameters, the <emphasis>phase probability vector</emphasis> <computeroutput>probs</computeroutput> and the <emphasis>rate vector</emphasis> <computeroutput>rates</computeroutput>.</para><para>A <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation>-phase hyperexponential distribution is a mixture of <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> exponential distributions. For this reason, it is also referred to as <emphasis>mixed exponential distribution</emphasis> or <emphasis>parallel <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation>-phase exponential distribution</emphasis>.</para><para>A <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation>-phase hyperexponential distribution is characterized by two parameters, namely a <emphasis>phase probability vector</emphasis> <inlineequation><alt>$\mathbf{\alpha}=(\alpha_1,\ldots,\alpha_k)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_16.png"/></imageobject><textobject role="tex"><phrase>$\mathbf{\alpha}=(\alpha_1,\ldots,\alpha_k)$</phrase></textobject></inlinemediaobject></inlineequation> and a <emphasis>rate vector</emphasis> <inlineequation><alt>$\mathbf{\lambda}=(\lambda_1,\ldots,\lambda_k)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_17.png"/></imageobject><textobject role="tex"><phrase>$\mathbf{\lambda}=(\lambda_1,\ldots,\lambda_k)$</phrase></textobject></inlinemediaobject></inlineequation>.</para><para>A <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation>-phase hyperexponential distribution is frequently used in <emphasis>queueing theory</emphasis> to model the distribution of the superposition of <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> independent events, like, for instance, the service time distribution of a queueing station with <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> servers in parallel where the <inlineequation><alt>$i$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_18.png"/></imageobject><textobject role="tex"><phrase>$i$</phrase></textobject></inlinemediaobject></inlineequation>-th server is chosen with probability <inlineequation><alt>$\alpha_i$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_19.png"/></imageobject><textobject role="tex"><phrase>$\alpha_i$</phrase></textobject></inlinemediaobject></inlineequation> and its service time distribution is an exponential distribution with rate <inlineequation><alt>$\lambda_i$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_20.png"/></imageobject><textobject role="tex"><phrase>$\lambda_i$</phrase></textobject></inlinemediaobject></inlineequation> (Allen,1990; Papadopolous et al.,1993; Trivedi,2002).</para><para>For instance, CPUs service-time distribution in a computing system has often been observed to possess such a distribution (Rosin,1965). Also, the arrival of different types of customer to a single queueing station is often modeled as a hyperexponential distribution (Papadopolous et al.,1993). Similarly, if a product manufactured in several parallel assemply lines and the outputs are merged, the failure density of the overall product is likely to be hyperexponential (Trivedi,2002).</para><para>Finally, since the hyperexponential distribution exhibits a high Coefficient of Variation (CoV), that is a CoV &gt; 1, it is especially suited to fit empirical data with large CoV (Feitelson,2014; Wolski et al.,2013) and to approximate <emphasis>long-tail probability distributions</emphasis> (Feldmann et al.,1998).</para><para>See (Boost,2014) for more information and examples.</para><para>A <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation>-phase hyperexponential distribution has a probability density function <equation><title/><alt>\[ f(x) = \sum_{i=1}^k \alpha_i \lambda_i e^{-x\lambda_i} \]</alt><mediaobject><imageobject role="html"><imagedata format="PNG" align="center" fileref="images/random//form_21.png"/></imageobject><textobject role="tex"><phrase>\[ f(x) = \sum_{i=1}^k \alpha_i \lambda_i e^{-x\lambda_i} \]</phrase></textobject></mediaobject></equation> where:<itemizedlist>
  842. <listitem><para><inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> is the <emphasis>number of phases</emphasis> and also the size of the input vector parameters,</para>
  843. </listitem><listitem><para><inlineequation><alt>$\mathbf{\alpha}=(\alpha_1,\ldots,\alpha_k)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_16.png"/></imageobject><textobject role="tex"><phrase>$\mathbf{\alpha}=(\alpha_1,\ldots,\alpha_k)$</phrase></textobject></inlinemediaobject></inlineequation> is the <emphasis>phase probability vector</emphasis> parameter, and</para>
  844. </listitem><listitem><para><inlineequation><alt>$\mathbf{\lambda}=(\lambda_1,\ldots,\lambda_k)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_17.png"/></imageobject><textobject role="tex"><phrase>$\mathbf{\lambda}=(\lambda_1,\ldots,\lambda_k)$</phrase></textobject></inlinemediaobject></inlineequation> is the <emphasis>rate vector</emphasis> parameter.</para>
  845. </listitem></itemizedlist>
  846. Given a <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation>-phase hyperexponential distribution with phase probability vector <inlineequation><alt>$\mathbf{\alpha}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_22.png"/></imageobject><textobject role="tex"><phrase>$\mathbf{\alpha}$</phrase></textobject></inlinemediaobject></inlineequation> and rate vector <inlineequation><alt>$\mathbf{\lambda}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_23.png"/></imageobject><textobject role="tex"><phrase>$\mathbf{\lambda}$</phrase></textobject></inlinemediaobject></inlineequation>, the random variate generation algorithm consists of the following steps (Tyszer,1999):<orderedlist>
  847. <listitem><para>Generate a random variable <inlineequation><alt>$U$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_24.png"/></imageobject><textobject role="tex"><phrase>$U$</phrase></textobject></inlinemediaobject></inlineequation> uniformly distribution on the interval <inlineequation><alt>$(0,1)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_25.png"/></imageobject><textobject role="tex"><phrase>$(0,1)$</phrase></textobject></inlinemediaobject></inlineequation>.</para>
  848. </listitem><listitem><para>Use <inlineequation><alt>$U$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_24.png"/></imageobject><textobject role="tex"><phrase>$U$</phrase></textobject></inlinemediaobject></inlineequation> to select the appropriate <inlineequation><alt>$\lambda_i$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_20.png"/></imageobject><textobject role="tex"><phrase>$\lambda_i$</phrase></textobject></inlinemediaobject></inlineequation> (e.g., the <emphasis>alias method</emphasis> can possibly be used for this step).</para>
  849. </listitem><listitem><para>Generate an exponentially distributed random variable <inlineequation><alt>$X$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_26.png"/></imageobject><textobject role="tex"><phrase>$X$</phrase></textobject></inlinemediaobject></inlineequation> with rate parameter <inlineequation><alt>$\lambda_i$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_20.png"/></imageobject><textobject role="tex"><phrase>$\lambda_i$</phrase></textobject></inlinemediaobject></inlineequation>.</para>
  850. </listitem><listitem><para>Return <inlineequation><alt>$X$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_26.png"/></imageobject><textobject role="tex"><phrase>$X$</phrase></textobject></inlinemediaobject></inlineequation>.</para>
  851. </listitem></orderedlist>
  852. References:<orderedlist>
  853. <listitem><para>A.O. Allen, <emphasis>Probability, Statistics, and Queuing Theory with Computer Science Applications, Second Edition</emphasis>, Academic Press, 1990.</para>
  854. </listitem><listitem><para>Boost C++ Libraries, <emphasis>Boost.Math / Statistical Distributions: Hyperexponential Distribution</emphasis>, Online: <ulink url="http://www.boost.org/doc/libs/release/libs/math/doc/html/dist.html">http://www.boost.org/doc/libs/release/libs/math/doc/html/dist.html</ulink> , 2014.</para>
  855. </listitem><listitem><para>D.G. Feitelson, <emphasis>Workload Modeling for Computer Systems Performance Evaluation</emphasis>, Cambridge University Press, 2014</para>
  856. </listitem><listitem><para>A. Feldmann and W. Whitt, <emphasis>Fitting mixtures of exponentials to long-tail distributions to analyze network performance models</emphasis>, Performance Evaluation 31(3-4):245, doi:10.1016/S0166-5316(97)00003-5, 1998.</para>
  857. </listitem><listitem><para>H.T. Papadopolous, C. Heavey and J. Browne, <emphasis>Queueing Theory in Manufacturing Systems Analysis and Design</emphasis>, Chapman &amp; Hall/CRC, 1993, p. 35.</para>
  858. </listitem><listitem><para>R.F. Rosin, <emphasis>Determining a computing center environment</emphasis>, Communications of the ACM 8(7):463-468, 1965.</para>
  859. </listitem><listitem><para>K.S. Trivedi, <emphasis>Probability and Statistics with Reliability, Queueing, and Computer Science Applications</emphasis>, John Wiley &amp; Sons, Inc., 2002.</para>
  860. </listitem><listitem><para>J. Tyszer, <emphasis>Object-Oriented Computer Simulation of Discrete-Event Systems</emphasis>, Springer, 1999.</para>
  861. </listitem><listitem><para>Wikipedia, <emphasis>Hyperexponential Distribution</emphasis>, Online: <ulink url="http://en.wikipedia.org/wiki/Hyperexponential_distribution">http://en.wikipedia.org/wiki/Hyperexponential_distribution</ulink> , 2014.</para>
  862. </listitem><listitem><para>Wolfram Mathematica, <emphasis>Hyperexponential Distribution</emphasis>, Online: <ulink url="http://reference.wolfram.com/language/ref/HyperexponentialDistribution.html">http://reference.wolfram.com/language/ref/HyperexponentialDistribution.html</ulink> , 2014.</para>
  863. </listitem></orderedlist>
  864. <para>Marco Guazzone (<ulink url="mailto:marco.guazzone@gmail.com">marco.guazzone@gmail.com</ulink>) </para>
  865. </para></description><class name="param_type"><description><para>The parameters of a hyperexponential distribution.</para><para>Stores the <emphasis>phase probability vector</emphasis> and the <emphasis>rate vector</emphasis> of the hyperexponential distribution.</para><para><para>Marco Guazzone (<ulink url="mailto:marco.guazzone@gmail.com">marco.guazzone@gmail.com</ulink>) </para>
  866. </para></description><typedef name="distribution_type"><type><classname>hyperexponential_distribution</classname></type></typedef>
  867. <method-group name="public member functions">
  868. <method name="probabilities" cv="const"><type>std::vector&lt; RealT &gt;</type><description><para>Gets the <emphasis>phase probability vector</emphasis> parameter of the distribtuion.</para><para>
  869. <note><para>The returned probabilities are the normalized version of the ones passed at construction time. </para>
  870. </note>
  871. </para></description><returns><para>The <emphasis>phase probability vector</emphasis> parameter of the distribution.</para>
  872. </returns></method>
  873. <method name="rates" cv="const"><type>std::vector&lt; RealT &gt;</type><description><para>Gets the <emphasis>rate vector</emphasis> parameter of the distribtuion.</para><para>
  874. </para></description><returns><para>The <emphasis>rate vector</emphasis> parameter of the distribution. </para>
  875. </returns></method>
  876. </method-group>
  877. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> with the default parameters of the distribution. </para></description></constructor>
  878. <constructor><template>
  879. <template-type-parameter name="ProbIterT"><purpose><para>Must meet the requirements of <computeroutput>InputIterator</computeroutput> concept (ISO,2014,sec. 24.2.3 [input.iterators]). </para></purpose></template-type-parameter>
  880. <template-type-parameter name="RateIterT"><purpose><para>Must meet the requirements of <computeroutput>InputIterator</computeroutput> concept (ISO,2014,sec. 24.2.3 [input.iterators]).</para></purpose></template-type-parameter>
  881. </template><parameter name="prob_first"><paramtype>ProbIterT</paramtype><description><para>The iterator to the beginning of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized. </para></description></parameter><parameter name="prob_last"><paramtype>ProbIterT</paramtype><description><para>The iterator to the ending of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized. </para></description></parameter><parameter name="rate_first"><paramtype>RateIterT</paramtype><description><para>The iterator to the beginning of the range of non-negative real elements representing the rates. </para></description></parameter><parameter name="rate_last"><paramtype>RateIterT</paramtype><description><para>The iterator to the ending of the range of non-negative real elements representing the rates.</para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from the <emphasis>phase probability vector</emphasis> and <emphasis>rate vector</emphasis> parameters of the distribution.</para><para>The <emphasis>phase probability vector</emphasis> parameter is given by the range defined by [<emphasis>prob_first</emphasis>, <emphasis>prob_last</emphasis>) iterator pair, and the <emphasis>rate vector</emphasis> parameter is given by the range defined by [<emphasis>rate_first</emphasis>, <emphasis>rate_last</emphasis>) iterator pair.</para><para>
  882. References:<orderedlist>
  883. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  884. </listitem></orderedlist>
  885. </para></description></constructor>
  886. <constructor><template>
  887. <template-type-parameter name="ProbRangeT"><purpose><para>Must meet the requirements of <ulink url="boost:/libs/range/doc/html/range/concepts.html">Range</ulink> concept. </para></purpose></template-type-parameter>
  888. <template-type-parameter name="RateRangeT"><purpose><para>Must meet the requirements of <ulink url="boost:/libs/range/doc/html/range/concepts.html">Range</ulink> concept.</para></purpose></template-type-parameter>
  889. </template><parameter name="prob_range"><paramtype>ProbRangeT const &amp;</paramtype><description><para>The range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized. </para></description></parameter><parameter name="rate_range"><paramtype>RateRangeT const &amp;</paramtype><description><para>The range of positive real elements representing the rates.</para></description></parameter><parameter name=""><paramtype>typename boost::disable_if_c&lt; boost::has_pre_increment&lt; ProbRangeT &gt;::value||boost::has_pre_increment&lt; RateRangeT &gt;::value &gt;::type *</paramtype><default>0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from the <emphasis>phase probability vector</emphasis> and <emphasis>rate vector</emphasis> parameters of the distribution.</para><para>The <emphasis>phase probability vector</emphasis> parameter is given by the range defined by <emphasis>prob_range</emphasis>, and the <emphasis>rate vector</emphasis> parameter is given by the range defined by <emphasis>rate_range</emphasis>.</para><para>
  890. <note><para>The final <computeroutput>disable_if</computeroutput> parameter is an implementation detail that differentiates between this two argument constructor and the iterator-based two argument constructor described below. </para>
  891. </note>
  892. </para></description></constructor>
  893. <constructor><template>
  894. <template-type-parameter name="RateIterT"><purpose><para>Must meet the requirements of <computeroutput>InputIterator</computeroutput> concept (ISO,2014,sec. 24.2.3 [input.iterators]). </para></purpose></template-type-parameter>
  895. </template><parameter name="rate_first"><paramtype>RateIterT</paramtype><description><para>The iterator to the beginning of the range of non-negative real elements representing the rates. </para></description></parameter><parameter name="rate_last"><paramtype>RateIterT</paramtype><description><para>The iterator to the ending of the range of non-negative real elements representing the rates.</para></description></parameter><parameter name=""><paramtype>typename boost::enable_if_c&lt; boost::has_pre_increment&lt; RateIterT &gt;::value &gt;::type *</paramtype><default>0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from the <emphasis>rate vector</emphasis> parameter of the distribution and with equal phase probabilities.</para><para>The <emphasis>rate vector</emphasis> parameter is given by the range defined by [<emphasis>rate_first</emphasis>, <emphasis>rate_last</emphasis>) iterator pair, and the <emphasis>phase probability vector</emphasis> parameter is set to the equal phase probabilities (i.e., to a vector of the same length <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> of the <emphasis>rate vector</emphasis> and with each element set to <inlineequation><alt>$1.0/k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_27.png"/></imageobject><textobject role="tex"><phrase>$1.0/k$</phrase></textobject></inlinemediaobject></inlineequation>).</para><para>
  896. <note><para>The final <computeroutput>disable_if</computeroutput> parameter is an implementation detail that differentiates between this two argument constructor and the range-based two argument constructor described above.</para>
  897. </note>
  898. References:<orderedlist>
  899. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  900. </listitem></orderedlist>
  901. </para></description></constructor>
  902. <constructor><template>
  903. <template-type-parameter name="RateRangeT"><purpose><para>Must meet the requirements of <ulink url="boost:/libs/range/doc/html/range/concepts.html">Range</ulink> concept.</para></purpose></template-type-parameter>
  904. </template><parameter name="rate_range"><paramtype>RateRangeT const &amp;</paramtype><description><para>The range of positive real elements representing the rates. </para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from the "rates" parameters of the distribution and with equal phase probabilities.</para><para>The <emphasis>rate vector</emphasis> parameter is given by the range defined by <emphasis>rate_range</emphasis>, and the <emphasis>phase probability vector</emphasis> parameter is set to the equal phase probabilities (i.e., to a vector of the same length <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> of the <emphasis>rate vector</emphasis> and with each element set to <inlineequation><alt>$1.0/k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_27.png"/></imageobject><textobject role="tex"><phrase>$1.0/k$</phrase></textobject></inlinemediaobject></inlineequation>).</para><para>
  905. </para></description></constructor>
  906. <constructor><parameter name="l1"><paramtype>std::initializer_list&lt; RealT &gt;</paramtype><description><para>The initializer list for inizializing the phase probability vector. </para></description></parameter><parameter name="l2"><paramtype>std::initializer_list&lt; RealT &gt;</paramtype><description><para>The initializer list for inizializing the rate vector.</para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from the <emphasis>phase probability vector</emphasis> and <emphasis>rate vector</emphasis> parameters of the distribution.</para><para>The <emphasis>phase probability vector</emphasis> parameter is given by the <emphasis>brace-init-list</emphasis> (ISO,2014,sec. 8.5.4 [dcl.init.list]) defined by <emphasis>l1</emphasis>, and the <emphasis>rate vector</emphasis> parameter is given by the <emphasis>brace-init-list</emphasis> (ISO,2014,sec. 8.5.4 [dcl.init.list]) defined by <emphasis>l2</emphasis>.</para><para>
  907. References:<orderedlist>
  908. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  909. </listitem></orderedlist>
  910. </para></description></constructor>
  911. <constructor><parameter name="l1"><paramtype>std::initializer_list&lt; RealT &gt;</paramtype><description><para>The initializer list for inizializing the rate vector.</para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from the <emphasis>rate vector</emphasis> parameter of the distribution and with equal phase probabilities.</para><para>The <emphasis>rate vector</emphasis> parameter is given by the <emphasis>brace-init-list</emphasis> (ISO,2014,sec. 8.5.4 [dcl.init.list]) defined by <emphasis>l1</emphasis>, and the <emphasis>phase probability vector</emphasis> parameter is set to the equal phase probabilities (i.e., to a vector of the same length <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> of the <emphasis>rate vector</emphasis> and with each element set to <inlineequation><alt>$1.0/k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_27.png"/></imageobject><textobject role="tex"><phrase>$1.0/k$</phrase></textobject></inlinemediaobject></inlineequation>).</para><para>
  912. References:<orderedlist>
  913. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  914. </listitem></orderedlist>
  915. </para></description></constructor>
  916. <method-group name="friend functions">
  917. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  918. <template-type-parameter name="CharT"/>
  919. <template-type-parameter name="Traits"/>
  920. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  921. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  922. <template-type-parameter name="CharT"/>
  923. <template-type-parameter name="Traits"/>
  924. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  925. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  926. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  927. </method-group>
  928. </class><typedef name="result_type"><type>RealT</type></typedef>
  929. <typedef name="input_type"><type>RealT</type></typedef>
  930. <method-group name="public member functions">
  931. <method name="operator()" cv="const"><type>RealT</type><template>
  932. <template-type-parameter name="URNG"><purpose><para>Must meet the requirements of <link linkend="boost_random.reference.concepts.uniform_random_number_generator">uniform random number generator</link> .</para></purpose></template-type-parameter>
  933. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype><description><para>A uniform random number generator object.</para></description></parameter><description><para>Gets a random variate distributed according to the hyperexponential distribution.</para><para>
  934. </para></description><returns><para>A random variate distributed according to the hyperexponential distribution. </para>
  935. </returns></method>
  936. <method name="operator()" cv="const"><type>RealT</type><template>
  937. <template-type-parameter name="URNG"><purpose><para>Must meet the requirements of <link linkend="boost_random.reference.concepts.uniform_random_number_generator">uniform random number generator</link> .</para></purpose></template-type-parameter>
  938. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype><description><para>A uniform random number generator object. </para></description></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype><description><para>A distribution parameter object.</para></description></parameter><description><para>Gets a random variate distributed according to the hyperexponential distribution with parameters specified by <computeroutput>param</computeroutput>.</para><para>
  939. </para></description><returns><para>A random variate distributed according to the hyperexponential distribution. distribution with parameters specified by <computeroutput>param</computeroutput>. </para>
  940. </returns></method>
  941. <method name="num_phases" cv="const"><type>std::size_t</type><description><para>Returns the number of phases of the distribution. </para></description></method>
  942. <method name="probabilities" cv="const"><type>std::vector&lt; RealT &gt;</type><description><para>Returns the <emphasis>phase probability vector</emphasis> parameter of the distribution. </para></description></method>
  943. <method name="rates" cv="const"><type>std::vector&lt; RealT &gt;</type><description><para>Returns the <emphasis>rate vector</emphasis> parameter of the distribution. </para></description></method>
  944. <method name="min" cv="const"><type>RealT</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  945. <method name="max" cv="const"><type>RealT</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  946. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  947. <method name="param"><type>void</type><parameter name="param"><paramtype><classname>param_type</classname> const &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  948. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  949. </method-group>
  950. <constructor><description><para>Constructs a 1-phase <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> (i.e., an exponential distribution) with rate 1. </para></description></constructor>
  951. <constructor><template>
  952. <template-type-parameter name="ProbIterT"><purpose><para>Must meet the requirements of <computeroutput>InputIterator</computeroutput> concept (ISO,2014,sec. 24.2.3 [input.iterators]). </para></purpose></template-type-parameter>
  953. <template-type-parameter name="RateIterT"><purpose><para>Must meet the requirements of <computeroutput>InputIterator</computeroutput> concept (ISO,2014,sec. 24.2.3 [input.iterators]).</para></purpose></template-type-parameter>
  954. </template><parameter name="prob_first"><paramtype>ProbIterT</paramtype><description><para>The iterator to the beginning of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized. </para></description></parameter><parameter name="prob_last"><paramtype>ProbIterT</paramtype><description><para>The iterator to the ending of the range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized. </para></description></parameter><parameter name="rate_first"><paramtype>RateIterT</paramtype><description><para>The iterator to the beginning of the range of non-negative real elements representing the rates. </para></description></parameter><parameter name="rate_last"><paramtype>RateIterT</paramtype><description><para>The iterator to the ending of the range of non-negative real elements representing the rates.</para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> from the <emphasis>phase probability vector</emphasis> and <emphasis>rate vector</emphasis> parameters of the distribution.</para><para>The <emphasis>phase probability vector</emphasis> parameter is given by the range defined by [<emphasis>prob_first</emphasis>, <emphasis>prob_last</emphasis>) iterator pair, and the <emphasis>rate vector</emphasis> parameter is given by the range defined by [<emphasis>rate_first</emphasis>, <emphasis>rate_last</emphasis>) iterator pair.</para><para>
  955. References:<orderedlist>
  956. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  957. </listitem></orderedlist>
  958. </para></description></constructor>
  959. <constructor><template>
  960. <template-type-parameter name="ProbRangeT"><purpose><para>Must meet the requirements of <ulink url="boost:/libs/range/doc/html/range/concepts.html">Range</ulink> concept. </para></purpose></template-type-parameter>
  961. <template-type-parameter name="RateRangeT"><purpose><para>Must meet the requirements of <ulink url="boost:/libs/range/doc/html/range/concepts.html">Range</ulink> concept.</para></purpose></template-type-parameter>
  962. </template><parameter name="prob_range"><paramtype>ProbRangeT const &amp;</paramtype><description><para>The range of non-negative real elements representing the phase probabilities; if elements don't sum to 1, they are normalized. </para></description></parameter><parameter name="rate_range"><paramtype>RateRangeT const &amp;</paramtype><description><para>The range of positive real elements representing the rates.</para></description></parameter><parameter name=""><paramtype>typename boost::disable_if_c&lt; boost::has_pre_increment&lt; ProbRangeT &gt;::value||boost::has_pre_increment&lt; RateRangeT &gt;::value &gt;::type *</paramtype><default>0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> from the <emphasis>phase probability vector</emphasis> and <emphasis>rate vector</emphasis> parameters of the distribution.</para><para>The <emphasis>phase probability vector</emphasis> parameter is given by the range defined by <emphasis>prob_range</emphasis>, and the <emphasis>rate vector</emphasis> parameter is given by the range defined by <emphasis>rate_range</emphasis>.</para><para>
  963. <note><para>The final <computeroutput>disable_if</computeroutput> parameter is an implementation detail that differentiates between this two argument constructor and the iterator-based two argument constructor described below. </para>
  964. </note>
  965. </para></description></constructor>
  966. <constructor><template>
  967. <template-type-parameter name="RateIterT"><purpose><para>Must meet the requirements of <computeroutput>InputIterator</computeroutput> concept (ISO,2014,sec. 24.2.3 [input.iterators]). </para></purpose></template-type-parameter>
  968. </template><parameter name="rate_first"><paramtype>RateIterT</paramtype><description><para>The iterator to the beginning of the range of non-negative real elements representing the rates. </para></description></parameter><parameter name="rate_last"><paramtype>RateIterT</paramtype><description><para>The iterator to the ending of the range of non-negative real elements representing the rates.</para></description></parameter><parameter name=""><paramtype>typename boost::enable_if_c&lt; boost::has_pre_increment&lt; RateIterT &gt;::value &gt;::type *</paramtype><default>0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> from the <emphasis>rate vector</emphasis> parameter of the distribution and with equal phase probabilities.</para><para>The <emphasis>rate vector</emphasis> parameter is given by the range defined by [<emphasis>rate_first</emphasis>, <emphasis>rate_last</emphasis>) iterator pair, and the <emphasis>phase probability vector</emphasis> parameter is set to the equal phase probabilities (i.e., to a vector of the same length <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> of the <emphasis>rate vector</emphasis> and with each element set to <inlineequation><alt>$1.0/k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_27.png"/></imageobject><textobject role="tex"><phrase>$1.0/k$</phrase></textobject></inlinemediaobject></inlineequation>).</para><para>
  969. <note><para>The final <computeroutput>disable_if</computeroutput> parameter is an implementation detail that differentiates between this two argument constructor and the range-based two argument constructor described above.</para>
  970. </note>
  971. References:<orderedlist>
  972. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  973. </listitem></orderedlist>
  974. </para></description></constructor>
  975. <constructor><template>
  976. <template-type-parameter name="RateRangeT"><purpose><para>Must meet the requirements of <ulink url="boost:/libs/range/doc/html/range/concepts.html">Range</ulink> concept.</para></purpose></template-type-parameter>
  977. </template><parameter name="rate_range"><paramtype>RateRangeT const &amp;</paramtype><description><para>The range of positive real elements representing the rates. </para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution::param_type">param_type</classname></computeroutput> from the "rates" parameters of the distribution and with equal phase probabilities.</para><para>The <emphasis>rate vector</emphasis> parameter is given by the range defined by <emphasis>rate_range</emphasis>, and the <emphasis>phase probability vector</emphasis> parameter is set to the equal phase probabilities (i.e., to a vector of the same length <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> of the <emphasis>rate vector</emphasis> and with each element set to <inlineequation><alt>$1.0/k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_27.png"/></imageobject><textobject role="tex"><phrase>$1.0/k$</phrase></textobject></inlinemediaobject></inlineequation>).</para><para>
  978. </para></description></constructor>
  979. <constructor specifiers="explicit"><parameter name="param"><paramtype><classname>param_type</classname> const &amp;</paramtype><description><para>The parameters of the distribution. </para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> from its parameters.</para><para>
  980. </para></description></constructor>
  981. <constructor><parameter name="l1"><paramtype>std::initializer_list&lt; RealT &gt; const &amp;</paramtype><description><para>The initializer list for inizializing the phase probability vector. </para></description></parameter><parameter name="l2"><paramtype>std::initializer_list&lt; RealT &gt; const &amp;</paramtype><description><para>The initializer list for inizializing the rate vector.</para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> from the <emphasis>phase probability vector</emphasis> and <emphasis>rate vector</emphasis> parameters of the distribution.</para><para>The <emphasis>phase probability vector</emphasis> parameter is given by the <emphasis>brace-init-list</emphasis> (ISO,2014,sec. 8.5.4 [dcl.init.list]) defined by <emphasis>l1</emphasis>, and the <emphasis>rate vector</emphasis> parameter is given by the <emphasis>brace-init-list</emphasis> (ISO,2014,sec. 8.5.4 [dcl.init.list]) defined by <emphasis>l2</emphasis>.</para><para>
  982. References:<orderedlist>
  983. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  984. </listitem></orderedlist>
  985. </para></description></constructor>
  986. <constructor><parameter name="l1"><paramtype>std::initializer_list&lt; RealT &gt; const &amp;</paramtype><description><para>The initializer list for inizializing the rate vector.</para></description></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> from the <emphasis>rate vector</emphasis> parameter of the distribution and with equal phase probabilities.</para><para>The <emphasis>rate vector</emphasis> parameter is given by the <emphasis>brace-init-list</emphasis> (ISO,2014,sec. 8.5.4 [dcl.init.list]) defined by <emphasis>l1</emphasis>, and the <emphasis>phase probability vector</emphasis> parameter is set to the equal phase probabilities (i.e., to a vector of the same length <inlineequation><alt>$k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_15.png"/></imageobject><textobject role="tex"><phrase>$k$</phrase></textobject></inlinemediaobject></inlineequation> of the <emphasis>rate vector</emphasis> and with each element set to <inlineequation><alt>$1.0/k$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_27.png"/></imageobject><textobject role="tex"><phrase>$1.0/k$</phrase></textobject></inlinemediaobject></inlineequation>).</para><para>
  987. References:<orderedlist>
  988. <listitem><para>ISO, <emphasis>ISO/IEC 14882-2014: Information technology - Programming languages - C++</emphasis>, 2014</para>
  989. </listitem></orderedlist>
  990. </para></description></constructor>
  991. <method-group name="friend functions">
  992. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  993. <template-type-parameter name="CharT"/>
  994. <template-type-parameter name="Traits"/>
  995. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="hd"><paramtype>const <classname>hyperexponential_distribution</classname> &amp;</paramtype></parameter><description><para>Writes an <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  996. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  997. <template-type-parameter name="CharT"/>
  998. <template-type-parameter name="Traits"/>
  999. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="hd"><paramtype>const <classname>hyperexponential_distribution</classname> &amp;</paramtype></parameter><description><para>Reads an <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1000. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>hyperexponential_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>hyperexponential_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  1001. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>hyperexponential_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>hyperexponential_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::hyperexponential_distribution">hyperexponential_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  1002. </method-group>
  1003. </class>
  1004. </namespace>
  1005. </namespace>
  1006. </header>
  1007. <header name="boost/random/independent_bits.hpp">
  1008. <namespace name="boost">
  1009. <namespace name="random">
  1010. <class name="independent_bits_engine"><template>
  1011. <template-type-parameter name="Engine"/>
  1012. <template-nontype-parameter name="w"><type>std::size_t</type></template-nontype-parameter>
  1013. <template-type-parameter name="UIntType"/>
  1014. </template><description><para>An instantiation of class template <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It generates random numbers distributed between [0, 2^w) by combining one or more invocations of the base engine.</para><para>Requires: 0 &lt; w &lt;= std::numeric_limits&lt;UIntType&gt;::digits </para></description><typedef name="base_type"><type>Engine</type></typedef>
  1015. <typedef name="result_type"><type>UIntType</type></typedef>
  1016. <typedef name="base_result_type"><type>Engine::result_type</type></typedef>
  1017. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1018. <method-group name="public static functions">
  1019. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  1020. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  1021. </method-group>
  1022. <method-group name="public member functions">
  1023. <method name="seed"><type>void</type><description><para>Seeds an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput> using the default seed of the base generator. </para></description></method>
  1024. <method name="seed"><type>void</type><parameter name="seed"><paramtype>base_result_type</paramtype></parameter><description><para>Seeds an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput>, using <computeroutput>seed</computeroutput> as the seed for the base generator. </para></description></method>
  1025. <method name="seed"><type>void</type><template>
  1026. <template-type-parameter name="SeedSeq"/>
  1027. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput>, using <computeroutput>seq</computeroutput> to seed the base generator. </para></description></method>
  1028. <method name="seed"><type>void</type><template>
  1029. <template-type-parameter name="It"/>
  1030. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput> with values from the range defined by the input iterators first and last. first will be modified to point to the element after the last one used.</para><para>Throws: <computeroutput>std::invalid_argument</computeroutput> if the input range is too small.</para><para>Exception Safety: Basic </para></description></method>
  1031. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  1032. <method name="generate"><type>void</type><template>
  1033. <template-type-parameter name="Iter"/>
  1034. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1035. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  1036. <method name="base" cv="const"><type>const base_type &amp;</type></method>
  1037. </method-group>
  1038. <constructor><description><para>Constructs an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput> using the default constructor of the base generator. </para></description></constructor>
  1039. <constructor specifiers="explicit"><parameter name="seed"><paramtype>base_result_type</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput>, using seed as the constructor argument for both base generators. </para></description></constructor>
  1040. <constructor specifiers="explicit"><template>
  1041. <template-type-parameter name="SeedSeq"/>
  1042. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput>, using seq as the constructor argument for the base generator. </para></description></constructor>
  1043. <constructor><parameter name="base_arg"><paramtype>const base_type &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput> by copying <computeroutput>base</computeroutput>. </para></description></constructor>
  1044. <constructor><template>
  1045. <template-type-parameter name="It"/>
  1046. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Contructs an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput> with values from the range defined by the input iterators first and last. first will be modified to point to the element after the last one used.</para><para>Throws: <computeroutput>std::invalid_argument</computeroutput> if the input range is too small.</para><para>Exception Safety: Basic </para></description></constructor>
  1047. <method-group name="friend functions">
  1048. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1049. <template-type-parameter name="CharT"/>
  1050. <template-type-parameter name="Traits"/>
  1051. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="r"><paramtype>const <classname>independent_bits_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation if the generator to a <computeroutput>std::ostream</computeroutput>. The textual representation of the engine is the textual representation of the base engine. </para></description></method>
  1052. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1053. <template-type-parameter name="CharT"/>
  1054. <template-type-parameter name="Traits"/>
  1055. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="r"><paramtype>const <classname>independent_bits_engine</classname> &amp;</paramtype></parameter><description><para>Reads the state of an <computeroutput><classname alt="boost::random::independent_bits_engine">independent_bits_engine</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1056. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>independent_bits_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>independent_bits_engine</classname> &amp;</paramtype></parameter><description><para>Returns: true iff the two <computeroutput>independent_bits_engines</computeroutput> will produce the same sequence of values. </para></description></method>
  1057. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>independent_bits_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>independent_bits_engine</classname> &amp;</paramtype></parameter><description><para>Returns: true iff the two <computeroutput>independent_bits_engines</computeroutput> will produce different sequences of values. </para></description></method>
  1058. </method-group>
  1059. </class>
  1060. </namespace>
  1061. </namespace>
  1062. </header>
  1063. <header name="boost/random/inversive_congruential.hpp">
  1064. <namespace name="boost">
  1065. <namespace name="random">
  1066. <class name="inversive_congruential_engine"><template>
  1067. <template-type-parameter name="IntType"/>
  1068. <template-nontype-parameter name="a"><type>IntType</type></template-nontype-parameter>
  1069. <template-nontype-parameter name="b"><type>IntType</type></template-nontype-parameter>
  1070. <template-nontype-parameter name="p"><type>IntType</type></template-nontype-parameter>
  1071. </template><description><para>Instantiations of class template <computeroutput><classname alt="boost::random::inversive_congruential_engine">inversive_congruential_engine</classname></computeroutput> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It uses the inversive congruential algorithm (ICG) described in</para><para> <blockquote><para> "Inversive pseudorandom number generators: concepts, results and links", Peter Hellekalek, In: "Proceedings of the 1995 Winter Simulation
  1072. Conference", C. Alexopoulos, K. Kang, W.R. Lilegdon, and D. Goldsman (editors), 1995, pp. 255-262. <ulink url="ftp://random.mat.sbg.ac.at/pub/data/wsc95.ps">ftp://random.mat.sbg.ac.at/pub/data/wsc95.ps</ulink> </para></blockquote> </para><para>The output sequence is defined by x(n+1) = (a*inv(x(n)) - b) (mod p), where x(0), a, b, and the prime number p are parameters of the generator. The expression inv(k) denotes the multiplicative inverse of k in the field of integer numbers modulo p, with inv(0) := 0.</para><para>The template parameter IntType shall denote a signed integral type large enough to hold p; a, b, and p are the parameters of the generators. The template parameter val is the validation value checked by validation.</para><para> <note><para> The implementation currently uses the Euclidian Algorithm to compute the multiplicative inverse. Therefore, the inversive generators are about 10-20 times slower than the others (see section"performance"). However, the paper talks of only 3x slowdown, so the Euclidian Algorithm is probably not optimal for calculating the multiplicative inverse. </para></note> </para></description><typedef name="result_type"><type>IntType</type></typedef>
  1073. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1074. <data-member name="multiplier" specifiers="static"><type>const result_type</type></data-member>
  1075. <data-member name="increment" specifiers="static"><type>const result_type</type></data-member>
  1076. <data-member name="modulus" specifiers="static"><type>const result_type</type></data-member>
  1077. <data-member name="default_seed" specifiers="static"><type>const IntType</type></data-member>
  1078. <method-group name="public static functions">
  1079. <method name="min" specifiers="static"><type>result_type</type></method>
  1080. <method name="max" specifiers="static"><type>result_type</type></method>
  1081. </method-group>
  1082. <method-group name="public member functions">
  1083. <method name="seed"><type>void</type><description><para>Calls seed(default_seed) </para></description></method>
  1084. <method name="seed"><type>void</type><parameter name="x0"><paramtype>IntType</paramtype></parameter><description><para>If c mod m is zero and x0 mod m is zero, changes the current value of the generator to 1. Otherwise, changes it to x0 mod m. If c is zero, distinct seeds in the range [1,m) will leave the generator in distinct states. If c is not zero, the range is [0,m). </para></description></method>
  1085. <method name="seed"><type>void</type><template>
  1086. <template-type-parameter name="SeedSeq"/>
  1087. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds an <computeroutput><classname alt="boost::random::inversive_congruential_engine">inversive_congruential_engine</classname></computeroutput> using values from a SeedSeq. </para></description></method>
  1088. <method name="seed"><type>void</type><template>
  1089. <template-type-parameter name="It"/>
  1090. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>seeds an <computeroutput><classname alt="boost::random::inversive_congruential_engine">inversive_congruential_engine</classname></computeroutput> with values taken from the itrator range [first, last) and adjusts <computeroutput>first</computeroutput> to point to the element after the last one used. If there are not enough elements, throws <computeroutput>std::invalid_argument</computeroutput>.</para><para><computeroutput>first</computeroutput> and <computeroutput>last</computeroutput> must be input iterators. </para></description></method>
  1091. <method name="operator()"><type>IntType</type><description><para>Returns the next output of the generator. </para></description></method>
  1092. <method name="generate"><type>void</type><template>
  1093. <template-type-parameter name="Iter"/>
  1094. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1095. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  1096. </method-group>
  1097. <constructor><description><para>Constructs an <computeroutput><classname alt="boost::random::inversive_congruential_engine">inversive_congruential_engine</classname></computeroutput>, seeding it with the default seed. </para></description></constructor>
  1098. <constructor specifiers="explicit"><parameter name="x0"><paramtype>IntType</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::inversive_congruential_engine">inversive_congruential_engine</classname></computeroutput>, seeding it with <computeroutput>x0</computeroutput>. </para></description></constructor>
  1099. <constructor specifiers="explicit"><template>
  1100. <template-type-parameter name="SeedSeq"/>
  1101. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::inversive_congruential_engine">inversive_congruential_engine</classname></computeroutput>, seeding it with values produced by a call to <computeroutput>seq.generate()</computeroutput>. </para></description></constructor>
  1102. <constructor><template>
  1103. <template-type-parameter name="It"/>
  1104. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::inversive_congruential_engine">inversive_congruential_engine</classname></computeroutput>, seeds it with values taken from the itrator range [first, last), and adjusts first to point to the element after the last one used. If there are not enough elements, throws <computeroutput>std::invalid_argument</computeroutput>.</para><para>first and last must be input iterators. </para></description></constructor>
  1105. <method-group name="friend functions">
  1106. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1107. <template-type-parameter name="CharT"/>
  1108. <template-type-parameter name="Traits"/>
  1109. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="x"><paramtype>const <classname>inversive_congruential_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1110. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1111. <template-type-parameter name="CharT"/>
  1112. <template-type-parameter name="Traits"/>
  1113. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="x"><paramtype>const <classname>inversive_congruential_engine</classname> &amp;</paramtype></parameter><description><para>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1114. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>inversive_congruential_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>inversive_congruential_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of outputs. </para></description></method>
  1115. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>inversive_congruential_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>inversive_congruential_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of outputs. </para></description></method>
  1116. </method-group>
  1117. </class><typedef name="hellekalek1995"><description><para>The specialization hellekalek1995 was suggested in</para><para> <blockquote><para> "Inversive pseudorandom number generators: concepts, results and links", Peter Hellekalek, In: "Proceedings of the 1995 Winter Simulation
  1118. Conference", C. Alexopoulos, K. Kang, W.R. Lilegdon, and D. Goldsman (editors), 1995, pp. 255-262. <ulink url="ftp://random.mat.sbg.ac.at/pub/data/wsc95.ps">ftp://random.mat.sbg.ac.at/pub/data/wsc95.ps</ulink> </para></blockquote> </para></description><type><classname>inversive_congruential_engine</classname>&lt; uint32_t, 9102, 2147483647-36884165, 2147483647 &gt;</type></typedef>
  1119. </namespace>
  1120. </namespace>
  1121. </header>
  1122. <header name="boost/random/lagged_fibonacci.hpp">
  1123. <namespace name="boost">
  1124. <namespace name="random">
  1125. <class name="lagged_fibonacci_01_engine"><template>
  1126. <template-type-parameter name="RealType"/>
  1127. <template-nontype-parameter name="w"><type>int</type></template-nontype-parameter>
  1128. <template-nontype-parameter name="p"><type>unsigned int</type></template-nontype-parameter>
  1129. <template-nontype-parameter name="q"><type>unsigned int</type></template-nontype-parameter>
  1130. </template><description><para>Instantiations of class template <computeroutput>lagged_fibonacci_01</computeroutput> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It uses a lagged Fibonacci algorithm with two lags <computeroutput>p</computeroutput> and <computeroutput>q</computeroutput>, evaluated in floating-point arithmetic: x(i) = x(i-p) + x(i-q) (mod 1) with p &gt; q. See</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para><para> <note><para> The quality of the generator crucially depends on the choice of the parameters. User code should employ one of the sensibly parameterized generators such as <classname alt="boost::random::lagged_fibonacci607">lagged_fibonacci607</classname> instead. </para></note> </para><para>The generator requires considerable amounts of memory for the storage of its state array. For example, <classname alt="boost::random::lagged_fibonacci607">lagged_fibonacci607</classname> requires about 4856 bytes and <classname alt="boost::random::lagged_fibonacci44497">lagged_fibonacci44497</classname> requires about 350 KBytes. </para></description><typedef name="result_type"><type>RealType</type></typedef>
  1131. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1132. <data-member name="word_size" specifiers="static"><type>const int</type></data-member>
  1133. <data-member name="long_lag" specifiers="static"><type>const unsigned int</type></data-member>
  1134. <data-member name="short_lag" specifiers="static"><type>const unsigned int</type></data-member>
  1135. <data-member name="default_seed" specifiers="static"><type>const boost::uint32_t</type></data-member>
  1136. <method-group name="public member functions">
  1137. <method name="seed"><type>void</type><description><para>Calls seed(default_seed). </para></description></method>
  1138. <method name="seed"><type>void</type><parameter name="value"><paramtype>boost::uint32_t</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::minstd_rand0">minstd_rand0</classname> generator with the constructor parameter value and calls seed with it. Distinct seeds in the range [1, 2147483647) will produce generators with different states. Other seeds will be equivalent to some seed within this range. See <classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname> for details. </para></description></method>
  1139. <method name="seed"><type>void</type><template>
  1140. <template-type-parameter name="SeedSeq"/>
  1141. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds this <computeroutput><classname alt="boost::random::lagged_fibonacci_01_engine">lagged_fibonacci_01_engine</classname></computeroutput> using values produced by <computeroutput>seq.generate</computeroutput>. </para></description></method>
  1142. <method name="seed"><type>void</type><template>
  1143. <template-type-parameter name="It"/>
  1144. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds this <computeroutput><classname alt="boost::random::lagged_fibonacci_01_engine">lagged_fibonacci_01_engine</classname></computeroutput> using values from the iterator range [first, last). If there are not enough elements in the range, throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></method>
  1145. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  1146. <method name="generate"><type>void</type><template>
  1147. <template-type-parameter name="Iter"/>
  1148. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1149. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  1150. </method-group>
  1151. <constructor><description><para>Constructs a <computeroutput>lagged_fibonacci_01</computeroutput> generator and calls <computeroutput>seed()</computeroutput>. </para></description></constructor>
  1152. <constructor specifiers="explicit"><parameter name="value"><paramtype>uint32_t</paramtype></parameter><description><para>Constructs a <computeroutput>lagged_fibonacci_01</computeroutput> generator and calls <computeroutput>seed(value)</computeroutput>. </para></description></constructor>
  1153. <constructor specifiers="explicit"><template>
  1154. <template-type-parameter name="SeedSeq"/>
  1155. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs a <computeroutput>lagged_fibonacci_01</computeroutput> generator and calls <computeroutput>seed(gen)</computeroutput>. </para></description></constructor>
  1156. <constructor><template>
  1157. <template-type-parameter name="It"/>
  1158. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter></constructor>
  1159. <method-group name="public static functions">
  1160. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  1161. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the upper bound of the generators outputs. </para></description></method>
  1162. </method-group>
  1163. <method-group name="friend functions">
  1164. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1165. <template-type-parameter name="CharT"/>
  1166. <template-type-parameter name="Traits"/>
  1167. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>lagged_fibonacci_01_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1168. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1169. <template-type-parameter name="CharT"/>
  1170. <template-type-parameter name="Traits"/>
  1171. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>lagged_fibonacci_01_engine</classname> &amp;</paramtype></parameter><description><para>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1172. <method name="operator=="><type>friend bool</type><parameter name="x_"><paramtype>const <classname>lagged_fibonacci_01_engine</classname> &amp;</paramtype></parameter><parameter name="y_"><paramtype>const <classname>lagged_fibonacci_01_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of outputs. </para></description></method>
  1173. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>lagged_fibonacci_01_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>lagged_fibonacci_01_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of outputs. </para></description></method>
  1174. </method-group>
  1175. </class><class name="lagged_fibonacci_engine"><template>
  1176. <template-type-parameter name="UIntType"/>
  1177. <template-nontype-parameter name="w"><type>int</type></template-nontype-parameter>
  1178. <template-nontype-parameter name="p"><type>unsigned int</type></template-nontype-parameter>
  1179. <template-nontype-parameter name="q"><type>unsigned int</type></template-nontype-parameter>
  1180. </template><description><para>Instantiations of class template <classname alt="boost::random::lagged_fibonacci_engine">lagged_fibonacci_engine</classname> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It uses a lagged Fibonacci algorithm with two lags <computeroutput>p</computeroutput> and <computeroutput>q:</computeroutput> x(i) = x(i-p) + x(i-q) (mod 2<superscript>w</superscript>) with p &gt; q. </para></description><typedef name="result_type"><type>UIntType</type></typedef>
  1181. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1182. <data-member name="word_size" specifiers="static"><type>const int</type></data-member>
  1183. <data-member name="long_lag" specifiers="static"><type>const unsigned int</type></data-member>
  1184. <data-member name="short_lag" specifiers="static"><type>const unsigned int</type></data-member>
  1185. <data-member name="default_seed" specifiers="static"><type>const UIntType</type></data-member>
  1186. <method-group name="public static functions">
  1187. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  1188. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  1189. </method-group>
  1190. <method-group name="public member functions">
  1191. <method name="seed"><type>void</type><description><para>Calls <computeroutput>seed(default_seed)</computeroutput>. </para></description></method>
  1192. <method name="seed"><type>void</type><parameter name="value"><paramtype>UIntType</paramtype></parameter><description><para>Sets the state of the generator to values produced by a <classname alt="boost::random::minstd_rand0">minstd_rand0</classname> generator. </para></description></method>
  1193. <method name="seed"><type>void</type><template>
  1194. <template-type-parameter name="SeedSeq"/>
  1195. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Sets the state of the generator using values produced by seq. </para></description></method>
  1196. <method name="seed"><type>void</type><template>
  1197. <template-type-parameter name="It"/>
  1198. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Sets the state of the generator to values from the iterator range [first, last). If there are not enough elements in the range [first, last) throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></method>
  1199. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  1200. <method name="generate"><type>void</type><template>
  1201. <template-type-parameter name="Iter"/>
  1202. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1203. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  1204. </method-group>
  1205. <constructor><description><para>Creates a new <computeroutput><classname alt="boost::random::lagged_fibonacci_engine">lagged_fibonacci_engine</classname></computeroutput> and calls <computeroutput>seed()</computeroutput>. </para></description></constructor>
  1206. <constructor specifiers="explicit"><parameter name="value"><paramtype>UIntType</paramtype></parameter><description><para>Creates a new <computeroutput><classname alt="boost::random::lagged_fibonacci_engine">lagged_fibonacci_engine</classname></computeroutput> and calls <computeroutput>seed(value)</computeroutput>. </para></description></constructor>
  1207. <constructor specifiers="explicit"><template>
  1208. <template-type-parameter name="SeedSeq"/>
  1209. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Creates a new <computeroutput><classname alt="boost::random::lagged_fibonacci_engine">lagged_fibonacci_engine</classname></computeroutput> and calls <computeroutput>seed(seq)</computeroutput>. </para></description></constructor>
  1210. <constructor><template>
  1211. <template-type-parameter name="It"/>
  1212. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Creates a new <computeroutput><classname alt="boost::random::lagged_fibonacci_engine">lagged_fibonacci_engine</classname></computeroutput> and calls <computeroutput>seed(first, last)</computeroutput>. </para></description></constructor>
  1213. <method-group name="friend functions">
  1214. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1215. <template-type-parameter name="CharT"/>
  1216. <template-type-parameter name="Traits"/>
  1217. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>lagged_fibonacci_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1218. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1219. <template-type-parameter name="CharT"/>
  1220. <template-type-parameter name="Traits"/>
  1221. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>lagged_fibonacci_engine</classname> &amp;</paramtype></parameter><description><para>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1222. <method name="operator=="><type>friend bool</type><parameter name="x_"><paramtype>const <classname>lagged_fibonacci_engine</classname> &amp;</paramtype></parameter><parameter name="y_"><paramtype>const <classname>lagged_fibonacci_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of outputs. </para></description></method>
  1223. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>lagged_fibonacci_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>lagged_fibonacci_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of outputs. </para></description></method>
  1224. </method-group>
  1225. </class><typedef name="lagged_fibonacci607"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 607, 273 &gt;</type></typedef>
  1226. <typedef name="lagged_fibonacci1279"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 1279, 418 &gt;</type></typedef>
  1227. <typedef name="lagged_fibonacci2281"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 2281, 1252 &gt;</type></typedef>
  1228. <typedef name="lagged_fibonacci3217"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 3217, 576 &gt;</type></typedef>
  1229. <typedef name="lagged_fibonacci4423"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 4423, 2098 &gt;</type></typedef>
  1230. <typedef name="lagged_fibonacci9689"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 9689, 5502 &gt;</type></typedef>
  1231. <typedef name="lagged_fibonacci19937"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 19937, 9842 &gt;</type></typedef>
  1232. <typedef name="lagged_fibonacci23209"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 23209, 13470 &gt;</type></typedef>
  1233. <typedef name="lagged_fibonacci44497"><description><para>The specializations lagged_fibonacci607 ... lagged_fibonacci44497 use well tested lags.</para><para>See</para><para> <blockquote><para> "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent Computer Sciences Laboratory Australian National University, December 1992 </para></blockquote> </para><para>The lags used here can be found in</para><para> <blockquote><para> "Uniform random number generators for supercomputers", Richard Brent, Proc. of Fifth Australian Supercomputer Conference, Melbourne, Dec. 1992, pp. 704-706. </para></blockquote> </para></description><type><classname>lagged_fibonacci_01_engine</classname>&lt; double, 48, 44497, 21034 &gt;</type></typedef>
  1234. </namespace>
  1235. </namespace>
  1236. </header>
  1237. <header name="boost/random/laplace_distribution.hpp">
  1238. <namespace name="boost">
  1239. <namespace name="random">
  1240. <class name="laplace_distribution"><template>
  1241. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  1242. </template><description><para>The laplace distribution is a real-valued distribution with two parameters, mean and beta.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \frac{e^-{\frac{|x-\mu|}{\beta}}}{2\beta}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_28.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{e^-{\frac{|x-\mu|}{\beta}}}{2\beta}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>laplace_distribution</classname></type></typedef>
  1243. <method-group name="public member functions">
  1244. <method name="mean" cv="const"><type>RealType</type><description><para>Returns the "mean" parameter of the distribtuion. </para></description></method>
  1245. <method name="beta" cv="const"><type>RealType</type><description><para>Returns the "beta" parameter of the distribution. </para></description></method>
  1246. </method-group>
  1247. <constructor specifiers="explicit"><parameter name="mean"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="beta"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::laplace_distribution::param_type">param_type</classname></computeroutput> from the "mean" and "beta" parameters of the distribution. </para></description></constructor>
  1248. <method-group name="friend functions">
  1249. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1250. <template-type-parameter name="CharT"/>
  1251. <template-type-parameter name="Traits"/>
  1252. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::laplace_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1253. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1254. <template-type-parameter name="CharT"/>
  1255. <template-type-parameter name="Traits"/>
  1256. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::laplace_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1257. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  1258. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  1259. </method-group>
  1260. </class><typedef name="result_type"><type>RealType</type></typedef>
  1261. <typedef name="input_type"><type>RealType</type></typedef>
  1262. <method-group name="public member functions">
  1263. <method name="operator()" cv="const"><type>RealType</type><template>
  1264. <template-type-parameter name="URNG"/>
  1265. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the laplace distribution. </para></description></method>
  1266. <method name="operator()" cv="const"><type>RealType</type><template>
  1267. <template-type-parameter name="URNG"/>
  1268. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed accordint to the laplace distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  1269. <method name="mean" cv="const"><type>RealType</type><description><para>Returns the "mean" parameter of the distribution. </para></description></method>
  1270. <method name="beta" cv="const"><type>RealType</type><description><para>Returns the "beta" parameter of the distribution. </para></description></method>
  1271. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  1272. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  1273. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  1274. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  1275. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  1276. </method-group>
  1277. <constructor specifiers="explicit"><parameter name="mean"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="beta"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::laplace_distribution">laplace_distribution</classname></computeroutput> from its "mean" and "beta" parameters. </para></description></constructor>
  1278. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::laplace_distribution">laplace_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  1279. <method-group name="friend functions">
  1280. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1281. <template-type-parameter name="CharT"/>
  1282. <template-type-parameter name="Traits"/>
  1283. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>laplace_distribution</classname> &amp;</paramtype></parameter><description><para>Writes an <computeroutput><classname alt="boost::random::laplace_distribution">laplace_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1284. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1285. <template-type-parameter name="CharT"/>
  1286. <template-type-parameter name="Traits"/>
  1287. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>laplace_distribution</classname> &amp;</paramtype></parameter><description><para>Reads an <computeroutput><classname alt="boost::random::laplace_distribution">laplace_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1288. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>laplace_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>laplace_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::laplace_distribution">laplace_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  1289. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>laplace_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>laplace_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::laplace_distribution">laplace_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  1290. </method-group>
  1291. </class>
  1292. </namespace>
  1293. </namespace>
  1294. </header>
  1295. <header name="boost/random/linear_congruential.hpp">
  1296. <namespace name="boost">
  1297. <namespace name="random">
  1298. <class name="linear_congruential_engine"><template>
  1299. <template-type-parameter name="IntType"/>
  1300. <template-nontype-parameter name="a"><type>IntType</type></template-nontype-parameter>
  1301. <template-nontype-parameter name="c"><type>IntType</type></template-nontype-parameter>
  1302. <template-nontype-parameter name="m"><type>IntType</type></template-nontype-parameter>
  1303. </template><description><para>Instantiations of class template <classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . Linear congruential pseudo-random number generators are described in:</para><para> <blockquote><para> "Mathematical methods in large-scale computing units", D. H. Lehmer, Proc. 2nd Symposium on Large-Scale Digital Calculating Machines, Harvard University Press, 1951, pp. 141-146 </para></blockquote> </para><para>Let x(n) denote the sequence of numbers returned by some pseudo-random number generator. Then for the linear congruential generator, x(n+1) := (a * x(n) + c) mod m. Parameters for the generator are x(0), a, c, m. The template parameter IntType shall denote an integral type. It must be large enough to hold values a, c, and m. The template parameters a and c must be smaller than m.</para><para>Note: The quality of the generator crucially depends on the choice of the parameters. User code should use one of the sensibly parameterized generators such as minstd_rand instead. </para></description><typedef name="result_type"><type>IntType</type></typedef>
  1304. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1305. <data-member name="multiplier" specifiers="static"><type>const IntType</type></data-member>
  1306. <data-member name="increment" specifiers="static"><type>const IntType</type></data-member>
  1307. <data-member name="modulus" specifiers="static"><type>const IntType</type></data-member>
  1308. <data-member name="default_seed" specifiers="static"><type>const IntType</type></data-member>
  1309. <method-group name="public member functions">
  1310. <method name="seed"><type>void</type><description><para>Calls seed(default_seed) </para></description></method>
  1311. <method name="seed"><type>void</type><parameter name="x0_"><paramtype>IntType</paramtype></parameter><description><para>If c mod m is zero and x0 mod m is zero, changes the current value of the generator to 1. Otherwise, changes it to x0 mod m. If c is zero, distinct seeds in the range [1,m) will leave the generator in distinct states. If c is not zero, the range is [0,m). </para></description></method>
  1312. <method name="seed"><type>void</type><template>
  1313. <template-type-parameter name="SeedSeq"/>
  1314. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput> using values from a SeedSeq. </para></description></method>
  1315. <method name="seed"><type>void</type><template>
  1316. <template-type-parameter name="It"/>
  1317. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>seeds a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput> with values taken from the itrator range [first, last) and adjusts <computeroutput>first</computeroutput> to point to the element after the last one used. If there are not enough elements, throws <computeroutput>std::invalid_argument</computeroutput>.</para><para><computeroutput>first</computeroutput> and <computeroutput>last</computeroutput> must be input iterators. </para></description></method>
  1318. <method name="operator()"><type>IntType</type><description><para>Returns the next value of the <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput>. </para></description></method>
  1319. <method name="generate"><type>void</type><template>
  1320. <template-type-parameter name="Iter"/>
  1321. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1322. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  1323. </method-group>
  1324. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput>, using the default seed </para></description></constructor>
  1325. <constructor specifiers="explicit"><parameter name="x0"><paramtype>IntType</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput>, seeding it with <computeroutput>x0</computeroutput>. </para></description></constructor>
  1326. <constructor specifiers="explicit"><template>
  1327. <template-type-parameter name="SeedSeq"/>
  1328. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput>, seeding it with values produced by a call to <computeroutput>seq.generate()</computeroutput>. </para></description></constructor>
  1329. <constructor><template>
  1330. <template-type-parameter name="It"/>
  1331. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput> and seeds it with values taken from the itrator range [first, last) and adjusts first to point to the element after the last one used. If there are not enough elements, throws <computeroutput>std::invalid_argument</computeroutput>.</para><para>first and last must be input iterators. </para></description></constructor>
  1332. <method-group name="public static functions">
  1333. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput> can produce. </para></description></method>
  1334. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput> can produce. </para></description></method>
  1335. </method-group>
  1336. <method-group name="friend functions">
  1337. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1338. <template-type-parameter name="CharT"/>
  1339. <template-type-parameter name="Traits"/>
  1340. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="lcg"><paramtype>const <classname>linear_congruential_engine</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1341. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1342. <template-type-parameter name="CharT"/>
  1343. <template-type-parameter name="Traits"/>
  1344. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="lcg"><paramtype><classname>linear_congruential_engine</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1345. </method-group>
  1346. </class><class name="rand48"><description><para>Class <computeroutput><classname alt="boost::random::rand48">rand48</classname></computeroutput> models a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It uses the linear congruential algorithm with the parameters a = 0x5DEECE66D, c = 0xB, m = 2**48. It delivers identical results to the <computeroutput>lrand48()</computeroutput> function available on some systems (assuming lcong48 has not been called).</para><para>It is only available on systems where <computeroutput>uint64_t</computeroutput> is provided as an integral type, so that for example static in-class constants and/or enum definitions with large <computeroutput>uint64_t</computeroutput> numbers work. </para></description><typedef name="result_type"><type>boost::uint32_t</type></typedef>
  1347. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1348. <method-group name="public static functions">
  1349. <method name="min" specifiers="static"><type>uint32_t</type><description><para>Returns the smallest value that the generator can produce </para></description></method>
  1350. <method name="max" specifiers="static"><type>uint32_t</type><description><para>Returns the largest value that the generator can produce </para></description></method>
  1351. </method-group>
  1352. <method-group name="public member functions">
  1353. <method name="seed"><type>void</type><description><para>Seeds the generator with the default seed. </para></description></method>
  1354. <method name="seed"><type>void</type><parameter name="x0"><paramtype>result_type</paramtype></parameter><description><para>Changes the current value x(n) of the generator to (x0 &lt;&lt; 16) | 0x330e. </para></description></method>
  1355. <method name="seed"><type>void</type><template>
  1356. <template-type-parameter name="It"/>
  1357. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds the generator using values from an iterator range, and updates first to point one past the last value consumed. </para></description></method>
  1358. <method name="seed"><type>void</type><template>
  1359. <template-type-parameter name="SeedSeq"/>
  1360. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds the generator with values produced by <computeroutput>seq.generate()</computeroutput>. </para></description></method>
  1361. <method name="operator()"><type>uint32_t</type><description><para>Returns the next value of the generator. </para></description></method>
  1362. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  1363. <method name="generate"><type>void</type><template>
  1364. <template-type-parameter name="Iter"/>
  1365. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1366. </method-group>
  1367. <constructor><description><para>Seeds the generator with the default seed. </para></description></constructor>
  1368. <constructor specifiers="explicit"><parameter name="x0"><paramtype>result_type</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::rand48">rand48</classname> generator with x(0) := (x0 &lt;&lt; 16) | 0x330e. </para></description></constructor>
  1369. <constructor specifiers="explicit"><template>
  1370. <template-type-parameter name="SeedSeq"/>
  1371. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds the generator with values produced by <computeroutput>seq.generate()</computeroutput>. </para></description></constructor>
  1372. <constructor><template>
  1373. <template-type-parameter name="It"/>
  1374. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds the generator using values from an iterator range, and updates first to point one past the last value consumed. </para></description></constructor>
  1375. <method-group name="friend functions">
  1376. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1377. <template-type-parameter name="CharT"/>
  1378. <template-type-parameter name="Traits"/>
  1379. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="r"><paramtype>const <classname>rand48</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::rand48">rand48</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1380. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1381. <template-type-parameter name="CharT"/>
  1382. <template-type-parameter name="Traits"/>
  1383. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="r"><paramtype><classname>rand48</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::rand48">rand48</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1384. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>rand48</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>rand48</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of values. </para></description></method>
  1385. <method name="operator!="><type>friend bool</type><parameter name="x"><paramtype>const <classname>rand48</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>rand48</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of values. </para></description></method>
  1386. </method-group>
  1387. </class><typedef name="minstd_rand0"><description><para>The specialization <classname alt="boost::random::minstd_rand0">minstd_rand0</classname> was originally suggested in</para><para> <blockquote><para> A pseudo-random number generator for the System/360, P.A. Lewis, A.S. Goodman, J.M. Miller, IBM Systems Journal, Vol. 8, No. 2, 1969, pp. 136-146 </para></blockquote> </para><para>It is examined more closely together with <classname alt="boost::random::minstd_rand">minstd_rand</classname> in</para><para> <blockquote><para> "Random Number Generators: Good ones are hard to find", Stephen K. Park and Keith W. Miller, Communications of the ACM, Vol. 31, No. 10, October 1988, pp. 1192-1201 </para></blockquote> </para></description><type><classname>linear_congruential_engine</classname>&lt; uint32_t, 16807, 0, 2147483647 &gt;</type></typedef>
  1388. <typedef name="minstd_rand"><description><para>The specialization <classname alt="boost::random::minstd_rand">minstd_rand</classname> was suggested in</para><para> <blockquote><para> "Random Number Generators: Good ones are hard to find", Stephen K. Park and Keith W. Miller, Communications of the ACM, Vol. 31, No. 10, October 1988, pp. 1192-1201 </para></blockquote> </para></description><type><classname>linear_congruential_engine</classname>&lt; uint32_t, 48271, 0, 2147483647 &gt;</type></typedef>
  1389. </namespace>
  1390. </namespace>
  1391. </header>
  1392. <header name="boost/random/linear_feedback_shift.hpp">
  1393. <namespace name="boost">
  1394. <namespace name="random">
  1395. <class name="linear_feedback_shift_engine"><template>
  1396. <template-type-parameter name="UIntType"/>
  1397. <template-nontype-parameter name="w"><type>int</type></template-nontype-parameter>
  1398. <template-nontype-parameter name="k"><type>int</type></template-nontype-parameter>
  1399. <template-nontype-parameter name="q"><type>int</type></template-nontype-parameter>
  1400. <template-nontype-parameter name="s"><type>int</type></template-nontype-parameter>
  1401. </template><description><para>Instatiations of <computeroutput>linear_feedback_shift</computeroutput> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It was originally proposed in</para><para> <blockquote><para> "Random numbers generated by linear recurrence modulo two.", Tausworthe, R. C.(1965), Mathematics of Computation 19, 201-209. </para></blockquote> </para></description><typedef name="result_type"><type>UIntType</type></typedef>
  1402. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1403. <data-member name="word_size" specifiers="static"><type>const int</type></data-member>
  1404. <data-member name="exponent1" specifiers="static"><type>const int</type></data-member>
  1405. <data-member name="exponent2" specifiers="static"><type>const int</type></data-member>
  1406. <data-member name="step_size" specifiers="static"><type>const int</type></data-member>
  1407. <data-member name="default_seed" specifiers="static"><type>const UIntType</type></data-member>
  1408. <method-group name="public static functions">
  1409. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  1410. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  1411. </method-group>
  1412. <method-group name="public member functions">
  1413. <method name="seed"><type>void</type><description><para>Seeds a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput> with the default seed. </para></description></method>
  1414. <method name="seed"><type>void</type><parameter name="s0"><paramtype>UIntType</paramtype></parameter><description><para>Seeds a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput> with <computeroutput>s0</computeroutput>. </para></description></method>
  1415. <method name="seed"><type>void</type><template>
  1416. <template-type-parameter name="SeedSeq"/>
  1417. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput> with values produced by <computeroutput>seq.generate()</computeroutput>. </para></description></method>
  1418. <method name="seed"><type>void</type><template>
  1419. <template-type-parameter name="It"/>
  1420. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput> with values from the range [first, last). </para></description></method>
  1421. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  1422. <method name="generate"><type>void</type><template>
  1423. <template-type-parameter name="Iter"/>
  1424. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1425. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  1426. </method-group>
  1427. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput>, using the default seed. </para></description></constructor>
  1428. <constructor specifiers="explicit"><parameter name="s0"><paramtype>UIntType</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput>, seeding it with s0. </para></description></constructor>
  1429. <constructor specifiers="explicit"><template>
  1430. <template-type-parameter name="SeedSeq"/>
  1431. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput>, seeding it with seq. </para></description></constructor>
  1432. <constructor><template>
  1433. <template-type-parameter name="It"/>
  1434. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::linear_feedback_shift_engine">linear_feedback_shift_engine</classname></computeroutput>, seeding it with values from the range [first, last). </para></description></constructor>
  1435. <method-group name="friend functions">
  1436. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1437. <template-type-parameter name="CharT"/>
  1438. <template-type-parameter name="Traits"/>
  1439. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="x"><paramtype>const <classname>linear_feedback_shift_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1440. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1441. <template-type-parameter name="CharT"/>
  1442. <template-type-parameter name="Traits"/>
  1443. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="x"><paramtype>const <classname>linear_feedback_shift_engine</classname> &amp;</paramtype></parameter><description><para>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1444. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>linear_feedback_shift_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>linear_feedback_shift_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of outputs. </para></description></method>
  1445. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>linear_feedback_shift_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>linear_feedback_shift_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of outputs. </para></description></method>
  1446. </method-group>
  1447. </class>
  1448. </namespace>
  1449. </namespace>
  1450. </header>
  1451. <header name="boost/random/lognormal_distribution.hpp">
  1452. <namespace name="boost">
  1453. <namespace name="random">
  1454. <class name="lognormal_distribution"><template>
  1455. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  1456. </template><description><para>Instantiations of class template <classname alt="boost::random::lognormal_distribution">lognormal_distribution</classname> model a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . Such a distribution produces random numbers with <inlineequation><alt>$\displaystyle p(x) = \frac{1}{x s \sqrt{2\pi}} e^{\frac{-\left(\log(x)-m\right)^2}{2s^2}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_29.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{1}{x s \sqrt{2\pi}} e^{\frac{-\left(\log(x)-m\right)^2}{2s^2}}$</phrase></textobject></inlinemediaobject></inlineequation> for x &gt; 0.</para><para> <warning><para> This distribution has been updated to match the C++ standard. Its behavior has changed from the original boost::lognormal_distribution. A backwards compatible version is provided in namespace boost. </para></warning> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>lognormal_distribution</classname></type></typedef>
  1457. <method-group name="public member functions">
  1458. <method name="m" cv="const"><type>RealType</type><description><para>Returns the "m" parameter of the distribution. </para></description></method>
  1459. <method name="s" cv="const"><type>RealType</type><description><para>Returns the "s" parameter of the distribution. </para></description></method>
  1460. </method-group>
  1461. <constructor specifiers="explicit"><parameter name="m"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="s"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs the parameters of a <classname alt="boost::random::lognormal_distribution">lognormal_distribution</classname>. </para></description></constructor>
  1462. <method-group name="friend functions">
  1463. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1464. <template-type-parameter name="CharT"/>
  1465. <template-type-parameter name="Traits"/>
  1466. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a std::ostream. </para></description></method>
  1467. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1468. <template-type-parameter name="CharT"/>
  1469. <template-type-parameter name="Traits"/>
  1470. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a std::istream. </para></description></method>
  1471. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  1472. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  1473. </method-group>
  1474. </class><typedef name="input_type"><type><classname>normal_distribution</classname>&lt; RealType &gt;::input_type</type></typedef>
  1475. <typedef name="result_type"><type>RealType</type></typedef>
  1476. <method-group name="public member functions">
  1477. <method name="m" cv="const"><type>RealType</type><description><para>Returns the m parameter of the distribution. </para></description></method>
  1478. <method name="s" cv="const"><type>RealType</type><description><para>Returns the s parameter of the distribution. </para></description></method>
  1479. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  1480. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  1481. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  1482. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  1483. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  1484. <method name="operator()"><type>result_type</type><template>
  1485. <template-type-parameter name="Engine"/>
  1486. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the lognormal distribution. </para></description></method>
  1487. <method name="operator()"><type>result_type</type><template>
  1488. <template-type-parameter name="Engine"/>
  1489. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the lognormal distribution with parameters specified by param. </para></description></method>
  1490. </method-group>
  1491. <constructor specifiers="explicit"><parameter name="m"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="s"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <classname alt="boost::random::lognormal_distribution">lognormal_distribution</classname>. <computeroutput>m</computeroutput> and <computeroutput>s</computeroutput> are the parameters of the distribution. </para></description></constructor>
  1492. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::lognormal_distribution">lognormal_distribution</classname> from its parameters. </para></description></constructor>
  1493. <method-group name="friend functions">
  1494. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1495. <template-type-parameter name="CharT"/>
  1496. <template-type-parameter name="Traits"/>
  1497. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ld"><paramtype>const <classname>lognormal_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1498. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1499. <template-type-parameter name="CharT"/>
  1500. <template-type-parameter name="Traits"/>
  1501. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ld"><paramtype>const <classname>lognormal_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1502. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>lognormal_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>lognormal_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  1503. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>lognormal_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>lognormal_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values given equal generators. </para></description></method>
  1504. </method-group>
  1505. </class>
  1506. </namespace>
  1507. </namespace>
  1508. </header>
  1509. <header name="boost/random/mersenne_twister.hpp">
  1510. <namespace name="boost">
  1511. <namespace name="random">
  1512. <class name="mersenne_twister_engine"><template>
  1513. <template-type-parameter name="UIntType"/>
  1514. <template-nontype-parameter name="w"><type>std::size_t</type></template-nontype-parameter>
  1515. <template-nontype-parameter name="n"><type>std::size_t</type></template-nontype-parameter>
  1516. <template-nontype-parameter name="m"><type>std::size_t</type></template-nontype-parameter>
  1517. <template-nontype-parameter name="r"><type>std::size_t</type></template-nontype-parameter>
  1518. <template-nontype-parameter name="a"><type>UIntType</type></template-nontype-parameter>
  1519. <template-nontype-parameter name="u"><type>std::size_t</type></template-nontype-parameter>
  1520. <template-nontype-parameter name="d"><type>UIntType</type></template-nontype-parameter>
  1521. <template-nontype-parameter name="s"><type>std::size_t</type></template-nontype-parameter>
  1522. <template-nontype-parameter name="b"><type>UIntType</type></template-nontype-parameter>
  1523. <template-nontype-parameter name="t"><type>std::size_t</type></template-nontype-parameter>
  1524. <template-nontype-parameter name="c"><type>UIntType</type></template-nontype-parameter>
  1525. <template-nontype-parameter name="l"><type>std::size_t</type></template-nontype-parameter>
  1526. <template-nontype-parameter name="f"><type>UIntType</type></template-nontype-parameter>
  1527. </template><description><para>Instantiations of class template <classname alt="boost::random::mersenne_twister_engine">mersenne_twister_engine</classname> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It uses the algorithm described in</para><para> <blockquote><para> "Mersenne Twister: A 623-dimensionally equidistributed uniform
  1528. pseudo-random number generator", Makoto Matsumoto and Takuji Nishimura, ACM Transactions on Modeling and Computer Simulation: Special Issue on Uniform Random Number Generation, Vol. 8, No. 1, January 1998, pp. 3-30. </para></blockquote> </para><para> <note><para> The boost variant has been implemented from scratch and does not derive from or use mt19937.c provided on the above WWW site. However, it was verified that both produce identical output. </para></note> </para><para>The seeding from an integer was changed in April 2005 to address a <ulink url="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html">weakness</ulink>.</para><para>The quality of the generator crucially depends on the choice of the parameters. User code should employ one of the sensibly parameterized generators such as <classname alt="boost::random::mt19937">mt19937</classname> instead.</para><para>The generator requires considerable amounts of memory for the storage of its state array. For example, <classname alt="boost::random::mt11213b">mt11213b</classname> requires about 1408 bytes and <classname alt="boost::random::mt19937">mt19937</classname> requires about 2496 bytes. </para></description><typedef name="result_type"><type>UIntType</type></typedef>
  1529. <data-member name="word_size" specifiers="static"><type>const std::size_t</type></data-member>
  1530. <data-member name="state_size" specifiers="static"><type>const std::size_t</type></data-member>
  1531. <data-member name="shift_size" specifiers="static"><type>const std::size_t</type></data-member>
  1532. <data-member name="mask_bits" specifiers="static"><type>const std::size_t</type></data-member>
  1533. <data-member name="xor_mask" specifiers="static"><type>const UIntType</type></data-member>
  1534. <data-member name="tempering_u" specifiers="static"><type>const std::size_t</type></data-member>
  1535. <data-member name="tempering_d" specifiers="static"><type>const UIntType</type></data-member>
  1536. <data-member name="tempering_s" specifiers="static"><type>const std::size_t</type></data-member>
  1537. <data-member name="tempering_b" specifiers="static"><type>const UIntType</type></data-member>
  1538. <data-member name="tempering_t" specifiers="static"><type>const std::size_t</type></data-member>
  1539. <data-member name="tempering_c" specifiers="static"><type>const UIntType</type></data-member>
  1540. <data-member name="tempering_l" specifiers="static"><type>const std::size_t</type></data-member>
  1541. <data-member name="initialization_multiplier" specifiers="static"><type>const UIntType</type></data-member>
  1542. <data-member name="default_seed" specifiers="static"><type>const UIntType</type></data-member>
  1543. <data-member name="parameter_a" specifiers="static"><type>const UIntType</type></data-member>
  1544. <data-member name="output_u" specifiers="static"><type>const std::size_t</type></data-member>
  1545. <data-member name="output_s" specifiers="static"><type>const std::size_t</type></data-member>
  1546. <data-member name="output_b" specifiers="static"><type>const UIntType</type></data-member>
  1547. <data-member name="output_t" specifiers="static"><type>const std::size_t</type></data-member>
  1548. <data-member name="output_c" specifiers="static"><type>const UIntType</type></data-member>
  1549. <data-member name="output_l" specifiers="static"><type>const std::size_t</type></data-member>
  1550. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  1551. <method-group name="public member functions">
  1552. <method name="seed"><type>void</type><description><para>Calls <computeroutput>seed(default_seed)</computeroutput>. </para></description></method>
  1553. <method name="seed"><type>void</type><parameter name="value"><paramtype>UIntType</paramtype></parameter><description><para>Sets the state x(0) to v mod 2w. Then, iteratively, sets x(i) to (i + f * (x(i-1) xor (x(i-1) rshift w-2))) mod 2<superscript>w</superscript> for i = 1 .. n-1. x(n) is the first value to be returned by operator(). </para></description></method>
  1554. <method name="seed"><type>void</type><template>
  1555. <template-type-parameter name="SeeqSeq"/>
  1556. </template><parameter name="seq"><paramtype>SeeqSeq &amp;</paramtype></parameter><description><para>Seeds a <classname alt="boost::random::mersenne_twister_engine">mersenne_twister_engine</classname> using values produced by seq.generate(). </para></description></method>
  1557. <method name="seed"><type>void</type><template>
  1558. <template-type-parameter name="It"/>
  1559. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Sets the state of the generator using values from an iterator range. </para></description></method>
  1560. <method name="operator()"><type>result_type</type><description><para>Produces the next value of the generator. </para></description></method>
  1561. <method name="generate"><type>void</type><template>
  1562. <template-type-parameter name="Iter"/>
  1563. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  1564. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput> steps. Equivalent to</para><para><programlisting language="c++">for(unsigned long long i = 0; i &lt; z; ++i) {
  1565. gen();
  1566. }
  1567. </programlisting> </para></description></method>
  1568. </method-group>
  1569. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::mersenne_twister_engine">mersenne_twister_engine</classname></computeroutput> and calls <computeroutput>seed()</computeroutput>. </para></description></constructor>
  1570. <constructor specifiers="explicit"><parameter name="value"><paramtype>UIntType</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::mersenne_twister_engine">mersenne_twister_engine</classname></computeroutput> and calls <computeroutput>seed(value)</computeroutput>. </para></description></constructor>
  1571. <constructor><template>
  1572. <template-type-parameter name="It"/>
  1573. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter></constructor>
  1574. <constructor specifiers="explicit"><template>
  1575. <template-type-parameter name="SeedSeq"/>
  1576. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::mersenne_twister_engine">mersenne_twister_engine</classname> and calls <computeroutput>seed(gen)</computeroutput>.</para><para> <note><para> The copy constructor will always be preferred over the templated constructor. </para></note> </para></description></constructor>
  1577. <method-group name="public static functions">
  1578. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  1579. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  1580. </method-group>
  1581. <method-group name="friend functions">
  1582. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1583. <template-type-parameter name="CharT"/>
  1584. <template-type-parameter name="Traits"/>
  1585. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="mt"><paramtype>const <classname>mersenne_twister_engine</classname> &amp;</paramtype></parameter><description><para>Writes a <classname alt="boost::random::mersenne_twister_engine">mersenne_twister_engine</classname> to a <computeroutput>std::ostream</computeroutput> </para></description></method>
  1586. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1587. <template-type-parameter name="CharT"/>
  1588. <template-type-parameter name="Traits"/>
  1589. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="mt"><paramtype><classname>mersenne_twister_engine</classname> &amp;</paramtype></parameter><description><para>Reads a <classname alt="boost::random::mersenne_twister_engine">mersenne_twister_engine</classname> from a <computeroutput>std::istream</computeroutput> </para></description></method>
  1590. <method name="operator=="><type>friend bool</type><parameter name="x_"><paramtype>const <classname>mersenne_twister_engine</classname> &amp;</paramtype></parameter><parameter name="y_"><paramtype>const <classname>mersenne_twister_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators are in the same state, and will thus produce identical sequences. </para></description></method>
  1591. <method name="operator!="><type>friend bool</type><parameter name="x_"><paramtype>const <classname>mersenne_twister_engine</classname> &amp;</paramtype></parameter><parameter name="y_"><paramtype>const <classname>mersenne_twister_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators are in different states. </para></description></method>
  1592. </method-group>
  1593. </class><typedef name="mt11213b"><description><para>The specializations <classname alt="boost::random::mt11213b">mt11213b</classname> and <classname alt="boost::random::mt19937">mt19937</classname> are from</para><para> <blockquote><para> "Mersenne Twister: A 623-dimensionally equidistributed
  1594. uniform pseudo-random number generator", Makoto Matsumoto and Takuji Nishimura, ACM Transactions on Modeling and Computer Simulation: Special Issue on Uniform Random Number Generation, Vol. 8, No. 1, January 1998, pp. 3-30. </para></blockquote> </para></description><type><classname>mersenne_twister_engine</classname>&lt; uint32_t, 32, 351, 175, 19, 0xccab8ee7, 11, 0xffffffff, 7, 0x31b6ab00, 15, 0xffe50000, 17, 1812433253 &gt;</type></typedef>
  1595. <typedef name="mt19937"><description><para>The specializations <classname alt="boost::random::mt11213b">mt11213b</classname> and <classname alt="boost::random::mt19937">mt19937</classname> are from</para><para> <blockquote><para> "Mersenne Twister: A 623-dimensionally equidistributed
  1596. uniform pseudo-random number generator", Makoto Matsumoto and Takuji Nishimura, ACM Transactions on Modeling and Computer Simulation: Special Issue on Uniform Random Number Generation, Vol. 8, No. 1, January 1998, pp. 3-30. </para></blockquote> </para></description><type><classname>mersenne_twister_engine</classname>&lt; uint32_t, 32, 624, 397, 31, 0x9908b0df, 11, 0xffffffff, 7, 0x9d2c5680, 15, 0xefc60000, 18, 1812433253 &gt;</type></typedef>
  1597. <typedef name="mt19937_64"><type><classname>mersenne_twister_engine</classname>&lt; uint64_t, 64, 312, 156, 31, 0xb5026f5aa96619e9ull, 29, 0x5555555555555555ull, 17, 0x71d67fffeda60000ull, 37, 0xfff7eee000000000ull, 43, 6364136223846793005ull &gt;</type></typedef>
  1598. </namespace>
  1599. </namespace>
  1600. <macro name="BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD"/>
  1601. </header>
  1602. <header name="boost/random/negative_binomial_distribution.hpp">
  1603. <namespace name="boost">
  1604. <namespace name="random">
  1605. <class name="negative_binomial_distribution"><template>
  1606. <template-type-parameter name="IntType"><default>int</default></template-type-parameter>
  1607. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  1608. </template><description><para>The negative binomial distribution is an integer valued distribution with two parameters, <computeroutput>k</computeroutput> and <computeroutput>p</computeroutput>. The distribution produces non-negative values.</para><para>The distribution function is <inlineequation><alt>$\displaystyle P(i) = {k+i-1\choose i}p^k(1-p)^i$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_30.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle P(i) = {k+i-1\choose i}p^k(1-p)^i$</phrase></textobject></inlinemediaobject></inlineequation>.</para><para>This implementation uses a gamma-poisson mixture. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>negative_binomial_distribution</classname></type></typedef>
  1609. <method-group name="public member functions">
  1610. <method name="k" cv="const"><type>IntType</type><description><para>Returns the <computeroutput>k</computeroutput> parameter of the distribution. </para></description></method>
  1611. <method name="p" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>p</computeroutput> parameter of the distribution. </para></description></method>
  1612. </method-group>
  1613. <constructor specifiers="explicit"><parameter name="k"><paramtype>IntType</paramtype><default>1</default></parameter><parameter name="p"><paramtype>RealType</paramtype><default>0.5</default></parameter><description><para>Construct a <classname alt="boost::random::negative_binomial_distribution::param_type">param_type</classname> object. <computeroutput>k</computeroutput> and <computeroutput>p</computeroutput> are the parameters of the distribution.</para><para>Requires: k &gt;=0 &amp;&amp; 0 &lt;= p &lt;= 1 </para></description></constructor>
  1614. <method-group name="friend functions">
  1615. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1616. <template-type-parameter name="CharT"/>
  1617. <template-type-parameter name="Traits"/>
  1618. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1619. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1620. <template-type-parameter name="CharT"/>
  1621. <template-type-parameter name="Traits"/>
  1622. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype><classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1623. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have the same values. </para></description></method>
  1624. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have different values. </para></description></method>
  1625. </method-group>
  1626. </class><typedef name="result_type"><type>IntType</type></typedef>
  1627. <typedef name="input_type"><type>RealType</type></typedef>
  1628. <method-group name="public member functions">
  1629. <method name="operator()" cv="const"><type>IntType</type><template>
  1630. <template-type-parameter name="URNG"/>
  1631. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the negative binomial distribution. </para></description></method>
  1632. <method name="operator()" cv="const"><type>IntType</type><template>
  1633. <template-type-parameter name="URNG"/>
  1634. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the negative binomial distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  1635. <method name="k" cv="const"><type>IntType</type><description><para>Returns the <computeroutput>k</computeroutput> parameter of the distribution. </para></description></method>
  1636. <method name="p" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>p</computeroutput> parameter of the distribution. </para></description></method>
  1637. <method name="min" cv="const"><type>IntType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  1638. <method name="max" cv="const"><type>IntType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  1639. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  1640. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets parameters of the distribution. </para></description></method>
  1641. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  1642. </method-group>
  1643. <constructor specifiers="explicit"><parameter name="k"><paramtype>IntType</paramtype><default>1</default></parameter><parameter name="p"><paramtype>RealType</paramtype><default>0.5</default></parameter><description><para>Construct a <computeroutput><classname alt="boost::random::negative_binomial_distribution">negative_binomial_distribution</classname></computeroutput> object. <computeroutput>k</computeroutput> and <computeroutput>p</computeroutput> are the parameters of the distribution.</para><para>Requires: k &gt;=0 &amp;&amp; 0 &lt;= p &lt;= 1 </para></description></constructor>
  1644. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Construct an <computeroutput><classname alt="boost::random::negative_binomial_distribution">negative_binomial_distribution</classname></computeroutput> object from the parameters. </para></description></constructor>
  1645. <method-group name="friend functions">
  1646. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1647. <template-type-parameter name="CharT"/>
  1648. <template-type-parameter name="Traits"/>
  1649. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="bd"><paramtype>const <classname>negative_binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1650. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1651. <template-type-parameter name="CharT"/>
  1652. <template-type-parameter name="Traits"/>
  1653. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="bd"><paramtype><classname>negative_binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1654. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>negative_binomial_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>negative_binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce the same sequence of values, given equal generators. </para></description></method>
  1655. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>negative_binomial_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>negative_binomial_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions could produce different sequences of values, given equal generators. </para></description></method>
  1656. </method-group>
  1657. </class>
  1658. </namespace>
  1659. </namespace>
  1660. </header>
  1661. <header name="boost/random/niederreiter_base2.hpp">
  1662. <namespace name="boost">
  1663. <namespace name="random">
  1664. <class name="niederreiter_base2_engine"><template>
  1665. <template-type-parameter name="UIntType"/>
  1666. <template-nontype-parameter name="w"><type>unsigned</type></template-nontype-parameter>
  1667. <template-type-parameter name="Nb2Table"><default>default_niederreiter_base2_table</default></template-type-parameter>
  1668. </template><description><para>Instantiations of class template <classname alt="boost::random::niederreiter_base2_engine">niederreiter_base2_engine</classname> model a <link linkend="boost_random.reference.concepts.quasi_random_number_generator">quasi-random number generator</link> . The <classname alt="boost::random::niederreiter_base2_engine">niederreiter_base2_engine</classname> uses the algorithm described in <blockquote><para> Bratley, Fox, Niederreiter, ACM Trans. Model. Comp. Sim. 2, 195 (1992). </para></blockquote> </para><para><note><para><classname alt="boost::random::niederreiter_base2_engine">niederreiter_base2_engine</classname> skips trivial zeroes at the start of the sequence. For example, the beginning of the 2-dimensional Niederreiter base 2 sequence in <computeroutput><classname alt="boost::random::uniform_01">uniform_01</classname></computeroutput> distribution will look like this: <programlisting language="c++">0.5, 0.5,
  1669. 0.75, 0.25,
  1670. 0.25, 0.75,
  1671. 0.375, 0.375,
  1672. 0.875, 0.875,
  1673. ...
  1674. </programlisting></para>
  1675. </note>
  1676. In the following documentation <computeroutput>X</computeroutput> denotes the concrete class of the template <classname alt="boost::random::niederreiter_base2_engine">niederreiter_base2_engine</classname> returning objects of type <computeroutput>UIntType</computeroutput>, u and v are the values of <computeroutput>X</computeroutput>.</para><para>Some member functions may throw exceptions of type std::range_error. This happens when the quasi-random domain is exhausted and the generator cannot produce any more values. The length of the low discrepancy sequence is given by <inlineequation><alt>$L=Dimension \times (2^{w} - 1)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_31.png"/></imageobject><textobject role="tex"><phrase>$L=Dimension \times (2^{w} - 1)$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><typedef name="result_type"><type>UIntType</type></typedef>
  1677. <method-group name="public member functions">
  1678. <method name="dimension" cv="const"><type>std::size_t</type><description><para>Returns: The dimension of of the quasi-random domain.</para><para>Throws: nothing. </para></description></method>
  1679. <method name="seed"><type>void</type><purpose>Throws: nothing. </purpose><description><para>Effects: Resets the quasi-random number generator state to the one given by the default construction. Equivalent to u.seed(0). </para></description></method>
  1680. <method name="seed"><type>void</type><parameter name="init"><paramtype>UIntType</paramtype></parameter><purpose>Throws: range_error. </purpose><description><para>Effects: Effectively sets the quasi-random number generator state to the <computeroutput>init</computeroutput>-th vector in the <computeroutput>s</computeroutput>-dimensional quasi-random domain, where <computeroutput>s</computeroutput> == X::dimension(). <programlisting language="c++">X u, v;
  1681. for(int i = 0; i &lt; N; ++i)
  1682. for( std::size_t j = 0; j &lt; u.dimension(); ++j )
  1683. u();
  1684. v.seed(N);
  1685. assert(u() == v());
  1686. </programlisting> </para></description></method>
  1687. <method name="operator()"><type>result_type</type><description><para>Returns: Returns a successive element of an <computeroutput>s</computeroutput>-dimensional (s = X::dimension()) vector at each invocation. When all elements are exhausted, X::operator() begins anew with the starting element of a subsequent <computeroutput>s</computeroutput>-dimensional vector.</para><para>Throws: range_error. </para></description></method>
  1688. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Effects: Advances *this state as if <computeroutput>z</computeroutput> consecutive X::operator() invocations were executed. <programlisting language="c++">X u = v;
  1689. for(int i = 0; i &lt; N; ++i)
  1690. u();
  1691. v.discard(N);
  1692. assert(u() == v());
  1693. </programlisting></para><para>Throws: range_error. </para></description></method>
  1694. </method-group>
  1695. <constructor specifiers="explicit"><parameter name="s"><paramtype>std::size_t</paramtype></parameter><description><para>Effects: Constructs the default <computeroutput>s</computeroutput>-dimensional Niederreiter base 2 quasi-random number generator.</para><para>Throws: bad_alloc, invalid_argument, range_error. </para></description></constructor>
  1696. <method-group name="public static functions">
  1697. <method name="min" specifiers="static"><type>constexpr result_type</type><description><para>Returns: Tight lower bound on the set of values returned by operator().</para><para>Throws: nothing. </para></description></method>
  1698. <method name="max" specifiers="static"><type>constexpr result_type</type><description><para>Returns: Tight upper bound on the set of values returned by operator().</para><para>Throws: nothing. </para></description></method>
  1699. </method-group>
  1700. <method-group name="friend functions">
  1701. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>niederreiter_base2_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>niederreiter_base2_engine</classname> &amp;</paramtype></parameter><purpose>Returns true if the two generators will produce identical sequences of outputs. </purpose></method>
  1702. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>niederreiter_base2_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>niederreiter_base2_engine</classname> &amp;</paramtype></parameter><purpose>Returns true if the two generators will produce different sequences of outputs. </purpose></method>
  1703. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1704. <template-type-parameter name="CharT"/>
  1705. <template-type-parameter name="Traits"/>
  1706. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>niederreiter_base2_engine</classname> &amp;</paramtype></parameter><purpose>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </purpose></method>
  1707. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1708. <template-type-parameter name="CharT"/>
  1709. <template-type-parameter name="Traits"/>
  1710. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>niederreiter_base2_engine</classname> &amp;</paramtype></parameter><purpose>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </purpose></method>
  1711. </method-group>
  1712. </class><typedef name="niederreiter_base2"><description><para><note><para>This specialization of <classname alt="boost::random::niederreiter_base2_engine">niederreiter_base2_engine</classname> supports up to 4720 dimensions.</para>
  1713. </note>
  1714. Binary irreducible polynomials (primes in the ring <computeroutput>GF(2)[X]</computeroutput>, evaluated at <computeroutput>X=2</computeroutput>) were generated while condition <computeroutput>max(prime)</computeroutput> &lt; 2<superscript>16</superscript> was satisfied.</para><para>There are exactly 4720 such primes, which yields a Niederreiter base 2 table for 4720 dimensions.</para><para>However, it is possible to provide your own table to <classname alt="boost::random::niederreiter_base2_engine">niederreiter_base2_engine</classname> should the default one be insufficient. </para></description><type><classname>niederreiter_base2_engine</classname>&lt; boost::uint_least64_t, 64u, default_niederreiter_base2_table &gt;</type></typedef>
  1715. </namespace>
  1716. </namespace>
  1717. </header>
  1718. <header name="boost/random/non_central_chi_squared_distribution.hpp">
  1719. <namespace name="boost">
  1720. <namespace name="random">
  1721. <class name="non_central_chi_squared_distribution"><template>
  1722. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  1723. </template><description><para>The noncentral chi-squared distribution is a real valued distribution with two parameter, <computeroutput>k</computeroutput> and <computeroutput>lambda</computeroutput>. The distribution produces values &gt; 0.</para><para>This is the distribution of the sum of squares of k Normal distributed variates each with variance one and <inlineequation><alt>$\lambda$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_32.png"/></imageobject><textobject role="tex"><phrase>$\lambda$</phrase></textobject></inlinemediaobject></inlineequation> the sum of squares of the normal means.</para><para>The distribution function is <inlineequation><alt>$\displaystyle P(x) = \frac{1}{2} e^{-(x+\lambda)/2} \left( \frac{x}{\lambda} \right)^{k/4-1/2} I_{k/2-1}( \sqrt{\lambda x} )$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_33.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle P(x) = \frac{1}{2} e^{-(x+\lambda)/2} \left( \frac{x}{\lambda} \right)^{k/4-1/2} I_{k/2-1}( \sqrt{\lambda x} )$</phrase></textobject></inlinemediaobject></inlineequation>. where <inlineequation><alt>$\displaystyle I_\nu(z)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_34.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle I_\nu(z)$</phrase></textobject></inlinemediaobject></inlineequation> is a modified Bessel function of the first kind.</para><para>The algorithm is taken from</para><para> <blockquote><para> "Monte Carlo Methods in Financial Engineering", Paul Glasserman, 2003, XIII, 596 p, Stochastic Modelling and Applied Probability, Vol. 53, ISBN 978-0-387-21617-1, p 124, Fig. 3.5. </para></blockquote> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>non_central_chi_squared_distribution</classname></type></typedef>
  1724. <method-group name="public member functions">
  1725. <method name="k" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>k</computeroutput> parameter of the distribution </para></description></method>
  1726. <method name="lambda" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>lambda</computeroutput> parameter of the distribution </para></description></method>
  1727. </method-group>
  1728. <constructor specifiers="explicit"><parameter name="k"><paramtype>RealType</paramtype><default>1</default></parameter><parameter name="lambda"><paramtype>RealType</paramtype><default>1</default></parameter><description><para>Constructs the parameters of a <classname alt="boost::random::non_central_chi_squared_distribution">non_central_chi_squared_distribution</classname>. <computeroutput>k</computeroutput> and <computeroutput>lambda</computeroutput> are the parameter of the distribution.</para><para>Requires: k &gt; 0 &amp;&amp; lambda &gt; 0 </para></description></constructor>
  1729. <method-group name="friend functions">
  1730. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1731. <template-type-parameter name="CharT"/>
  1732. <template-type-parameter name="Traits"/>
  1733. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1734. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1735. <template-type-parameter name="CharT"/>
  1736. <template-type-parameter name="Traits"/>
  1737. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1738. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have the same values. </para></description></method>
  1739. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have different values. </para></description></method>
  1740. </method-group>
  1741. </class><typedef name="result_type"><type>RealType</type></typedef>
  1742. <typedef name="input_type"><type>RealType</type></typedef>
  1743. <method-group name="public member functions">
  1744. <method name="operator()" cv="const"><type>RealType</type><template>
  1745. <template-type-parameter name="URNG"/>
  1746. </template><parameter name="eng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the non central chi squared distribution specified by <computeroutput>param</computeroutput>. </para></description></method>
  1747. <method name="operator()"><type>RealType</type><template>
  1748. <template-type-parameter name="URNG"/>
  1749. </template><parameter name="eng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the non central chi squared distribution. </para></description></method>
  1750. <method name="k" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>k</computeroutput> parameter of the distribution. </para></description></method>
  1751. <method name="lambda" cv="const"><type>RealType</type><description><para>Returns the <computeroutput>lambda</computeroutput> parameter of the distribution. </para></description></method>
  1752. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  1753. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets parameters of the distribution. </para></description></method>
  1754. <method name="reset"><type>void</type><description><para>Resets the distribution, so that subsequent uses does not depend on values already produced by it. </para></description></method>
  1755. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  1756. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  1757. </method-group>
  1758. <constructor specifiers="explicit"><parameter name="k"><paramtype>RealType</paramtype><default>1</default></parameter><parameter name="lambda"><paramtype>RealType</paramtype><default>1</default></parameter><description><para>Construct a <computeroutput><classname alt="boost::random::non_central_chi_squared_distribution">non_central_chi_squared_distribution</classname></computeroutput> object. <computeroutput>k</computeroutput> and <computeroutput>lambda</computeroutput> are the parameter of the distribution.</para><para>Requires: k &gt; 0 &amp;&amp; lambda &gt; 0 </para></description></constructor>
  1759. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Construct a <computeroutput><classname alt="boost::random::non_central_chi_squared_distribution">non_central_chi_squared_distribution</classname></computeroutput> object from the parameter. </para></description></constructor>
  1760. <method-group name="friend functions">
  1761. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1762. <template-type-parameter name="CharT"/>
  1763. <template-type-parameter name="Traits"/>
  1764. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="dist"><paramtype>const <classname>non_central_chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1765. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1766. <template-type-parameter name="CharT"/>
  1767. <template-type-parameter name="Traits"/>
  1768. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="dist"><paramtype>const <classname>non_central_chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1769. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>non_central_chi_squared_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>non_central_chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if two distributions have the same parameters and produce the same sequence of random numbers given equal generators. </para></description></method>
  1770. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>non_central_chi_squared_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>non_central_chi_squared_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if two distributions have different parameters and/or can produce different sequences of random numbers given equal generators. </para></description></method>
  1771. </method-group>
  1772. </class>
  1773. </namespace>
  1774. </namespace>
  1775. </header>
  1776. <header name="boost/random/normal_distribution.hpp">
  1777. <namespace name="boost">
  1778. <namespace name="random">
  1779. <class name="normal_distribution"><template>
  1780. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  1781. </template><description><para>Instantiations of class template <classname alt="boost::random::normal_distribution">normal_distribution</classname> model a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . Such a distribution produces random numbers <computeroutput>x</computeroutput> distributed with probability density function <inlineequation><alt>$\displaystyle p(x) = \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{(x-\mu)^2}{2\sigma^2}} $</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_35.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{(x-\mu)^2}{2\sigma^2}} $</phrase></textobject></inlinemediaobject></inlineequation>, where mean and sigma are the parameters of the distribution.</para><para>The implementation uses the "ziggurat" algorithm, as described in</para><para> <blockquote><para> "The Ziggurat Method for Generating Random Variables", George Marsaglia and Wai Wan Tsang, Journal of Statistical Software, Volume 5, Number 8 (2000), 1-7. </para></blockquote> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>normal_distribution</classname></type></typedef>
  1782. <method-group name="public member functions">
  1783. <method name="mean" cv="const"><type>RealType</type><description><para>Returns the mean of the distribution. </para></description></method>
  1784. <method name="sigma" cv="const"><type>RealType</type><description><para>Returns the standand deviation of the distribution. </para></description></method>
  1785. </method-group>
  1786. <constructor specifiers="explicit"><parameter name="mean"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="sigma"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::normal_distribution::param_type">param_type</classname></computeroutput> with a given mean and standard deviation.</para><para>Requires: sigma &gt;= 0 </para></description></constructor>
  1787. <method-group name="friend functions">
  1788. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1789. <template-type-parameter name="CharT"/>
  1790. <template-type-parameter name="Traits"/>
  1791. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::normal_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1792. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1793. <template-type-parameter name="CharT"/>
  1794. <template-type-parameter name="Traits"/>
  1795. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::normal_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1796. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  1797. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  1798. </method-group>
  1799. </class><typedef name="input_type"><type>RealType</type></typedef>
  1800. <typedef name="result_type"><type>RealType</type></typedef>
  1801. <method-group name="public member functions">
  1802. <method name="mean" cv="const"><type>RealType</type><description><para>Returns the mean of the distribution. </para></description></method>
  1803. <method name="sigma" cv="const"><type>RealType</type><description><para>Returns the standard deviation of the distribution. </para></description></method>
  1804. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  1805. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  1806. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  1807. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  1808. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  1809. <method name="operator()"><type>result_type</type><template>
  1810. <template-type-parameter name="Engine"/>
  1811. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a normal variate. </para></description></method>
  1812. <method name="operator()"><type>result_type</type><template>
  1813. <template-type-parameter name="URNG"/>
  1814. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a normal variate with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  1815. </method-group>
  1816. <constructor specifiers="explicit"><parameter name="mean"><paramtype>const RealType &amp;</paramtype><default>0.0</default></parameter><parameter name="sigma"><paramtype>const RealType &amp;</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::normal_distribution">normal_distribution</classname></computeroutput> object. <computeroutput>mean</computeroutput> and <computeroutput>sigma</computeroutput> are the parameters for the distribution.</para><para>Requires: sigma &gt;= 0 </para></description></constructor>
  1817. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::normal_distribution">normal_distribution</classname></computeroutput> object from its parameters. </para></description></constructor>
  1818. <method-group name="friend functions">
  1819. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1820. <template-type-parameter name="CharT"/>
  1821. <template-type-parameter name="Traits"/>
  1822. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="nd"><paramtype>const <classname>normal_distribution</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::normal_distribution">normal_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1823. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1824. <template-type-parameter name="CharT"/>
  1825. <template-type-parameter name="Traits"/>
  1826. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="nd"><paramtype>const <classname>normal_distribution</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::normal_distribution">normal_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1827. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>normal_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>normal_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::normal_distribution">normal_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  1828. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>normal_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>normal_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::normal_distribution">normal_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  1829. </method-group>
  1830. </class>
  1831. </namespace>
  1832. </namespace>
  1833. </header>
  1834. <header name="boost/random/piecewise_constant_distribution.hpp">
  1835. <namespace name="boost">
  1836. <namespace name="random">
  1837. <class name="piecewise_constant_distribution"><template>
  1838. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  1839. <template-type-parameter name="WeightType"><default>double</default></template-type-parameter>
  1840. </template><description><para>The class <computeroutput><classname alt="boost::random::piecewise_constant_distribution">piecewise_constant_distribution</classname></computeroutput> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>piecewise_constant_distribution</classname></type></typedef>
  1841. <method-group name="friend functions">
  1842. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1843. <template-type-parameter name="CharT"/>
  1844. <template-type-parameter name="Traits"/>
  1845. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1846. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1847. <template-type-parameter name="CharT"/>
  1848. <template-type-parameter name="Traits"/>
  1849. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1850. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  1851. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  1852. </method-group>
  1853. <method-group name="public member functions">
  1854. <method name="intervals" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the interval boundaries. </para></description></method>
  1855. <method name="densities" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the probability densities over all the intervals of the distribution. </para></description></method>
  1856. </method-group>
  1857. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_constant_distribution::param_type">param_type</classname></computeroutput> object, representing a distribution that produces values uniformly distributed in the range [0, 1). </para></description></constructor>
  1858. <constructor><template>
  1859. <template-type-parameter name="IntervalIter"/>
  1860. <template-type-parameter name="WeightIter"/>
  1861. </template><parameter name="intervals_first"><paramtype>IntervalIter</paramtype></parameter><parameter name="intervals_last"><paramtype>IntervalIter</paramtype></parameter><parameter name="weight_first"><paramtype>WeightIter</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_constant_distribution::param_type">param_type</classname></computeroutput> object from two iterator ranges containing the interval boundaries and the interval weights. If there are less than two boundaries, then this is equivalent to the default constructor and creates a single interval, [0, 1).</para><para>The values of the interval boundaries must be strictly increasing, and the number of weights must be one less than the number of interval boundaries. If there are extra weights, they are ignored. </para></description></constructor>
  1862. <constructor><template>
  1863. <template-type-parameter name="T"/>
  1864. <template-type-parameter name="F"/>
  1865. </template><parameter name="il"><paramtype>const std::initializer_list&lt; T &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_constant_distribution::param_type">param_type</classname></computeroutput> object from an initializer_list containing the interval boundaries and a unary function specifying the weights. Each weight is determined by calling the function at the midpoint of the corresponding interval.</para><para>If the initializer_list contains less than two elements, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). </para></description></constructor>
  1866. <constructor><template>
  1867. <template-type-parameter name="IntervalRange"/>
  1868. <template-type-parameter name="WeightRange"/>
  1869. </template><parameter name="intervals_arg"><paramtype>const IntervalRange &amp;</paramtype></parameter><parameter name="weights_arg"><paramtype>const WeightRange &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_constant_distribution::param_type">param_type</classname></computeroutput> object from Boost.Range ranges holding the interval boundaries and the weights. If there are less than two interval boundaries, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). The number of weights must be one less than the number of interval boundaries. </para></description></constructor>
  1870. <constructor><template>
  1871. <template-type-parameter name="F"/>
  1872. </template><parameter name="nw"><paramtype>std::size_t</paramtype></parameter><parameter name="xmin"><paramtype>RealType</paramtype></parameter><parameter name="xmax"><paramtype>RealType</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs the parameters for a distribution that approximates a function. The range of the distribution is [xmin, xmax). This range is divided into nw equally sized intervals and the weights are found by calling the unary function f on the midpoints of the intervals. </para></description></constructor>
  1873. </class><typedef name="input_type"><type>std::size_t</type></typedef>
  1874. <typedef name="result_type"><type>RealType</type></typedef>
  1875. <method-group name="public member functions">
  1876. <method name="operator()" cv="const"><type>RealType</type><template>
  1877. <template-type-parameter name="URNG"/>
  1878. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a value distributed according to the parameters of the piecewist_constant_distribution. </para></description></method>
  1879. <method name="operator()" cv="const"><type>RealType</type><template>
  1880. <template-type-parameter name="URNG"/>
  1881. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a value distributed according to the parameters specified by param. </para></description></method>
  1882. <method name="min" cv="const"><type>result_type</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  1883. <method name="max" cv="const"><type>result_type</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  1884. <method name="densities" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the probability density over each interval. </para></description></method>
  1885. <method name="intervals" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the interval boundaries. </para></description></method>
  1886. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  1887. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  1888. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  1889. </method-group>
  1890. <constructor><description><para>Creates a new <computeroutput><classname alt="boost::random::piecewise_constant_distribution">piecewise_constant_distribution</classname></computeroutput> with a single interval, [0, 1). </para></description></constructor>
  1891. <constructor><template>
  1892. <template-type-parameter name="IntervalIter"/>
  1893. <template-type-parameter name="WeightIter"/>
  1894. </template><parameter name="first_interval"><paramtype>IntervalIter</paramtype></parameter><parameter name="last_interval"><paramtype>IntervalIter</paramtype></parameter><parameter name="first_weight"><paramtype>WeightIter</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_constant_distribution">piecewise_constant_distribution</classname> from two iterator ranges containing the interval boundaries and the interval weights. If there are less than two boundaries, then this is equivalent to the default constructor and creates a single interval, [0, 1).</para><para>The values of the interval boundaries must be strictly increasing, and the number of weights must be one less than the number of interval boundaries. If there are extra weights, they are ignored.</para><para>For example,</para><para><programlisting language="c++">double intervals[] = { 0.0, 1.0, 4.0 };
  1895. double weights[] = { 1.0, 1.0 };
  1896. piecewise_constant_distribution&lt;&gt; dist(
  1897. &amp;intervals[0], &amp;intervals[0] + 3, &amp;weights[0]);
  1898. </programlisting></para><para>The distribution has a 50% chance of producing a value between 0 and 1 and a 50% chance of producing a value between 1 and 4. </para></description></constructor>
  1899. <constructor><template>
  1900. <template-type-parameter name="T"/>
  1901. <template-type-parameter name="F"/>
  1902. </template><parameter name="il"><paramtype>std::initializer_list&lt; T &gt;</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_constant_distribution">piecewise_constant_distribution</classname> from an initializer_list containing the interval boundaries and a unary function specifying the weights. Each weight is determined by calling the function at the midpoint of the corresponding interval.</para><para>If the initializer_list contains less than two elements, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). </para></description></constructor>
  1903. <constructor><template>
  1904. <template-type-parameter name="IntervalsRange"/>
  1905. <template-type-parameter name="WeightsRange"/>
  1906. </template><parameter name="intervals_arg"><paramtype>const IntervalsRange &amp;</paramtype></parameter><parameter name="weights_arg"><paramtype>const WeightsRange &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_constant_distribution">piecewise_constant_distribution</classname> from Boost.Range ranges holding the interval boundaries and the weights. If there are less than two interval boundaries, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). The number of weights must be one less than the number of interval boundaries. </para></description></constructor>
  1907. <constructor><template>
  1908. <template-type-parameter name="F"/>
  1909. </template><parameter name="nw"><paramtype>std::size_t</paramtype></parameter><parameter name="xmin"><paramtype>RealType</paramtype></parameter><parameter name="xmax"><paramtype>RealType</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_constant_distribution">piecewise_constant_distribution</classname> that approximates a function. The range of the distribution is [xmin, xmax). This range is divided into nw equally sized intervals and the weights are found by calling the unary function f on the midpoints of the intervals. </para></description></constructor>
  1910. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_constant_distribution">piecewise_constant_distribution</classname> from its parameters. </para></description></constructor>
  1911. <method-group name="friend functions">
  1912. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1913. <template-type-parameter name="CharT"/>
  1914. <template-type-parameter name="Traits"/>
  1915. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="pcd"><paramtype>const <classname>piecewise_constant_distribution</classname> &amp;</paramtype></parameter><description><para>Writes a distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1916. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1917. <template-type-parameter name="CharT"/>
  1918. <template-type-parameter name="Traits"/>
  1919. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="pcd"><paramtype>const <classname>piecewise_constant_distribution</classname> &amp;</paramtype></parameter><description><para>Reads a distribution from a <computeroutput>std::istream</computeroutput> </para></description></method>
  1920. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>piecewise_constant_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>piecewise_constant_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will return the same sequence of values, when passed equal generators. </para></description></method>
  1921. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>piecewise_constant_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>piecewise_constant_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may return different sequences of values, when passed equal generators. </para></description></method>
  1922. </method-group>
  1923. </class>
  1924. </namespace>
  1925. </namespace>
  1926. </header>
  1927. <header name="boost/random/piecewise_linear_distribution.hpp">
  1928. <namespace name="boost">
  1929. <namespace name="random">
  1930. <class name="piecewise_linear_distribution"><template>
  1931. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  1932. </template><description><para>The class <computeroutput><classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname></computeroutput> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>piecewise_linear_distribution</classname></type></typedef>
  1933. <method-group name="friend functions">
  1934. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  1935. <template-type-parameter name="CharT"/>
  1936. <template-type-parameter name="Traits"/>
  1937. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  1938. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  1939. <template-type-parameter name="CharT"/>
  1940. <template-type-parameter name="Traits"/>
  1941. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  1942. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  1943. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  1944. </method-group>
  1945. <method-group name="public member functions">
  1946. <method name="intervals" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the interval boundaries. </para></description></method>
  1947. <method name="densities" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the probability densities at all the interval boundaries. </para></description></method>
  1948. </method-group>
  1949. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_linear_distribution::param_type">param_type</classname></computeroutput> object, representing a distribution that produces values uniformly distributed in the range [0, 1). </para></description></constructor>
  1950. <constructor><template>
  1951. <template-type-parameter name="IntervalIter"/>
  1952. <template-type-parameter name="WeightIter"/>
  1953. </template><parameter name="intervals_first"><paramtype>IntervalIter</paramtype></parameter><parameter name="intervals_last"><paramtype>IntervalIter</paramtype></parameter><parameter name="weight_first"><paramtype>WeightIter</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_linear_distribution::param_type">param_type</classname></computeroutput> object from two iterator ranges containing the interval boundaries and weights at the boundaries. If there are fewer than two boundaries, then this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1).</para><para>The values of the interval boundaries must be strictly increasing, and the number of weights must be the same as the number of interval boundaries. If there are extra weights, they are ignored. </para></description></constructor>
  1954. <constructor><template>
  1955. <template-type-parameter name="T"/>
  1956. <template-type-parameter name="F"/>
  1957. </template><parameter name="il"><paramtype>const std::initializer_list&lt; T &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_linear_distribution::param_type">param_type</classname></computeroutput> object from an initializer_list containing the interval boundaries and a unary function specifying the weights at the boundaries. Each weight is determined by calling the function at the corresponding point.</para><para>If the initializer_list contains fewer than two elements, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). </para></description></constructor>
  1958. <constructor><template>
  1959. <template-type-parameter name="IntervalRange"/>
  1960. <template-type-parameter name="WeightRange"/>
  1961. </template><parameter name="intervals_arg"><paramtype>const IntervalRange &amp;</paramtype></parameter><parameter name="weights_arg"><paramtype>const WeightRange &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::piecewise_linear_distribution::param_type">param_type</classname></computeroutput> object from Boost.Range ranges holding the interval boundaries and the weights at the boundaries. If there are fewer than two interval boundaries, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). The number of weights must be equal to the number of interval boundaries. </para></description></constructor>
  1962. <constructor><template>
  1963. <template-type-parameter name="F"/>
  1964. </template><parameter name="nw"><paramtype>std::size_t</paramtype></parameter><parameter name="xmin"><paramtype>RealType</paramtype></parameter><parameter name="xmax"><paramtype>RealType</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs the parameters for a distribution that approximates a function. The range of the distribution is [xmin, xmax). This range is divided into nw equally sized intervals and the weights are found by calling the unary function f on the boundaries of the intervals. </para></description></constructor>
  1965. </class><typedef name="input_type"><type>std::size_t</type></typedef>
  1966. <typedef name="result_type"><type>RealType</type></typedef>
  1967. <method-group name="public member functions">
  1968. <method name="operator()" cv="const"><type>RealType</type><template>
  1969. <template-type-parameter name="URNG"/>
  1970. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a value distributed according to the parameters of the <classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname>. </para></description></method>
  1971. <method name="operator()" cv="const"><type>RealType</type><template>
  1972. <template-type-parameter name="URNG"/>
  1973. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a value distributed according to the parameters specified by param. </para></description></method>
  1974. <method name="min" cv="const"><type>result_type</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  1975. <method name="max" cv="const"><type>result_type</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  1976. <method name="densities" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the probability densities at the interval boundaries. </para></description></method>
  1977. <method name="intervals" cv="const"><type>std::vector&lt; RealType &gt;</type><description><para>Returns a vector containing the interval boundaries. </para></description></method>
  1978. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  1979. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  1980. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  1981. </method-group>
  1982. <constructor><description><para>Creates a new <computeroutput><classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname></computeroutput> that produces values uniformly distributed in the range [0, 1). </para></description></constructor>
  1983. <constructor><template>
  1984. <template-type-parameter name="IntervalIter"/>
  1985. <template-type-parameter name="WeightIter"/>
  1986. </template><parameter name="first_interval"><paramtype>IntervalIter</paramtype></parameter><parameter name="last_interval"><paramtype>IntervalIter</paramtype></parameter><parameter name="first_weight"><paramtype>WeightIter</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname> from two iterator ranges containing the interval boundaries and the weights at the boundaries. If there are fewer than two boundaries, then this is equivalent to the default constructor and creates a distribution that produces values uniformly distributed in the range [0, 1).</para><para>The values of the interval boundaries must be strictly increasing, and the number of weights must be equal to the number of interval boundaries. If there are extra weights, they are ignored.</para><para>For example,</para><para><programlisting language="c++">double intervals[] = { 0.0, 1.0, 2.0 };
  1987. double weights[] = { 0.0, 1.0, 0.0 };
  1988. piecewise_constant_distribution&lt;&gt; dist(
  1989. &amp;intervals[0], &amp;intervals[0] + 3, &amp;weights[0]);
  1990. </programlisting></para><para>produces a triangle distribution. </para></description></constructor>
  1991. <constructor><template>
  1992. <template-type-parameter name="T"/>
  1993. <template-type-parameter name="F"/>
  1994. </template><parameter name="il"><paramtype>std::initializer_list&lt; T &gt;</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname> from an initializer_list containing the interval boundaries and a unary function specifying the weights. Each weight is determined by calling the function at the corresponding interval boundary.</para><para>If the initializer_list contains fewer than two elements, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). </para></description></constructor>
  1995. <constructor><template>
  1996. <template-type-parameter name="IntervalsRange"/>
  1997. <template-type-parameter name="WeightsRange"/>
  1998. </template><parameter name="intervals_arg"><paramtype>const IntervalsRange &amp;</paramtype></parameter><parameter name="weights_arg"><paramtype>const WeightsRange &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname> from Boost.Range ranges holding the interval boundaries and the weights. If there are fewer than two interval boundaries, this is equivalent to the default constructor and the distribution will produce values uniformly distributed in the range [0, 1). The number of weights must be equal to the number of interval boundaries. </para></description></constructor>
  1999. <constructor><template>
  2000. <template-type-parameter name="F"/>
  2001. </template><parameter name="nw"><paramtype>std::size_t</paramtype></parameter><parameter name="xmin"><paramtype>RealType</paramtype></parameter><parameter name="xmax"><paramtype>RealType</paramtype></parameter><parameter name="f"><paramtype>F</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname> that approximates a function. The range of the distribution is [xmin, xmax). This range is divided into nw equally sized intervals and the weights are found by calling the unary function f on the interval boundaries. </para></description></constructor>
  2002. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::piecewise_linear_distribution">piecewise_linear_distribution</classname> from its parameters. </para></description></constructor>
  2003. <method-group name="friend functions">
  2004. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2005. <template-type-parameter name="CharT"/>
  2006. <template-type-parameter name="Traits"/>
  2007. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="pld"><paramtype>const <classname>piecewise_linear_distribution</classname> &amp;</paramtype></parameter><description><para>Writes a distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2008. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2009. <template-type-parameter name="CharT"/>
  2010. <template-type-parameter name="Traits"/>
  2011. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="pld"><paramtype>const <classname>piecewise_linear_distribution</classname> &amp;</paramtype></parameter><description><para>Reads a distribution from a <computeroutput>std::istream</computeroutput> </para></description></method>
  2012. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>piecewise_linear_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>piecewise_linear_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will return the same sequence of values, when passed equal generators. </para></description></method>
  2013. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>piecewise_linear_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>piecewise_linear_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may return different sequences of values, when passed equal generators. </para></description></method>
  2014. </method-group>
  2015. </class>
  2016. </namespace>
  2017. </namespace>
  2018. </header>
  2019. <header name="boost/random/poisson_distribution.hpp">
  2020. <namespace name="boost">
  2021. <namespace name="random">
  2022. <class name="poisson_distribution"><template>
  2023. <template-type-parameter name="IntType"><default>int</default></template-type-parameter>
  2024. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  2025. </template><description><para>An instantiation of the class template <computeroutput><classname alt="boost::random::poisson_distribution">poisson_distribution</classname></computeroutput> is a model of <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . The poisson distribution has <inlineequation><alt>$p(i) = \frac{e^{-\lambda}\lambda^i}{i!}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_36.png"/></imageobject><textobject role="tex"><phrase>$p(i) = \frac{e^{-\lambda}\lambda^i}{i!}$</phrase></textobject></inlinemediaobject></inlineequation></para><para>This implementation is based on the PTRD algorithm described</para><para> <blockquote><para> "The transformed rejection method for generating Poisson random variables", Wolfgang Hormann, Insurance: Mathematics and Economics Volume 12, Issue 1, February 1993, Pages 39-45 </para></blockquote> </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>poisson_distribution</classname></type></typedef>
  2026. <method-group name="public member functions">
  2027. <method name="mean" cv="const"><type>RealType</type></method>
  2028. </method-group>
  2029. <constructor specifiers="explicit"><parameter name="mean"><paramtype>RealType</paramtype><default>1</default></parameter><description><para>Construct a <classname alt="boost::random::poisson_distribution::param_type">param_type</classname> object with the parameter "mean"</para><para>Requires: mean &gt; 0 </para></description></constructor>
  2030. <method-group name="friend functions">
  2031. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2032. <template-type-parameter name="CharT"/>
  2033. <template-type-parameter name="Traits"/>
  2034. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2035. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2036. <template-type-parameter name="CharT"/>
  2037. <template-type-parameter name="Traits"/>
  2038. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype><classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2039. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have the same values. </para></description></method>
  2040. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the parameters have different values. </para></description></method>
  2041. </method-group>
  2042. </class><typedef name="result_type"><type>IntType</type></typedef>
  2043. <typedef name="input_type"><type>RealType</type></typedef>
  2044. <method-group name="public member functions">
  2045. <method name="operator()" cv="const"><type>IntType</type><template>
  2046. <template-type-parameter name="URNG"/>
  2047. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the poisson distribution. </para></description></method>
  2048. <method name="operator()" cv="const"><type>IntType</type><template>
  2049. <template-type-parameter name="URNG"/>
  2050. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the poisson distribution with parameters specified by param. </para></description></method>
  2051. <method name="mean" cv="const"><type>RealType</type><description><para>Returns the "mean" parameter of the distribution. </para></description></method>
  2052. <method name="min" cv="const"><type>IntType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  2053. <method name="max" cv="const"><type>IntType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  2054. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2055. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets parameters of the distribution. </para></description></method>
  2056. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2057. </method-group>
  2058. <constructor specifiers="explicit"><parameter name="mean"><paramtype>RealType</paramtype><default>1</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::poisson_distribution">poisson_distribution</classname></computeroutput> with the parameter <computeroutput>mean</computeroutput>.</para><para>Requires: mean &gt; 0 </para></description></constructor>
  2059. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Construct an <computeroutput><classname alt="boost::random::poisson_distribution">poisson_distribution</classname></computeroutput> object from the parameters. </para></description></constructor>
  2060. <method-group name="friend functions">
  2061. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2062. <template-type-parameter name="CharT"/>
  2063. <template-type-parameter name="Traits"/>
  2064. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="pd"><paramtype>const <classname>poisson_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the parameters of the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2065. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2066. <template-type-parameter name="CharT"/>
  2067. <template-type-parameter name="Traits"/>
  2068. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="pd"><paramtype><classname>poisson_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the parameters of the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2069. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>poisson_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>poisson_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce the same sequence of values, given equal generators. </para></description></method>
  2070. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>poisson_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>poisson_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions could produce different sequences of values, given equal generators. </para></description></method>
  2071. </method-group>
  2072. </class>
  2073. </namespace>
  2074. </namespace>
  2075. </header>
  2076. <header name="boost/random/random_device.hpp">
  2077. <namespace name="boost">
  2078. <namespace name="random">
  2079. <class name="random_device"><inherit access="private">noncopyable</inherit><description><para>Class <classname alt="boost::random::random_device">random_device</classname> models a <link linkend="boost_random.reference.concepts.non_deterministic_uniform_random_number_generator">non-deterministic random number generator</link> . It uses one or more implementation-defined stochastic processes to generate a sequence of uniformly distributed non-deterministic random numbers. For those environments where a non-deterministic random number generator is not available, class <classname alt="boost::random::random_device">random_device</classname> must not be implemented. See</para><para> <blockquote><para> "Randomness Recommendations for Security", D. Eastlake, S. Crocker, J. Schiller, Network Working Group, RFC 1750, December 1994 </para></blockquote> </para><para>for further discussions.</para><para> <note><para> Some operating systems abstract the computer hardware enough to make it difficult to non-intrusively monitor stochastic processes. However, several do provide a special device for exactly this purpose. It seems to be impossible to emulate the functionality using Standard C++ only, so users should be aware that this class may not be available on all platforms. </para></note> </para><para><emphasis role="bold">Implementation Note for Linux</emphasis></para><para>On the Linux operating system, token is interpreted as a filesystem path. It is assumed that this path denotes an operating system pseudo-device which generates a stream of non-deterministic random numbers. The pseudo-device should never signal an error or end-of-file. Otherwise, <computeroutput>std::ios_base::failure</computeroutput> is thrown. By default, <classname alt="boost::random::random_device">random_device</classname> uses the /dev/urandom pseudo-device to retrieve the random numbers. Another option would be to specify the /dev/random pseudo-device, which blocks on reads if the entropy pool has no more random bits available.</para><para><emphasis role="bold">Implementation Note for Windows</emphasis></para><para>On the Windows operating system, token is interpreted as the name of a cryptographic service provider. By default <classname alt="boost::random::random_device">random_device</classname> uses MS_DEF_PROV.</para><para><emphasis role="bold">Performance</emphasis></para><para>The test program <ulink url="../../libs/random/performance/nondet_random_speed.cpp">nondet_random_speed.cpp</ulink> measures the execution times of the random_device.hpp implementation of the above algorithms in a tight loop. The performance has been evaluated on an Intel(R) Core(TM) i7 CPU Q 840 @ 1.87GHz, 1867 Mhz with Visual C++ 2010, Microsoft Windows 7 Professional and with gcc 4.4.5, Ubuntu Linux 2.6.35-25-generic.</para><para><informaltable><tgroup cols="2"><tbody><row>
  2080. <entry><emphasis role="bold">Platform</emphasis></entry><entry><emphasis role="bold">time per invocation [microseconds] </emphasis></entry></row>
  2081. <row>
  2082. <entry>Windows </entry><entry>2.9 </entry></row>
  2083. <row>
  2084. <entry>Linux </entry><entry>1.7 </entry></row>
  2085. </tbody></tgroup></informaltable>
  2086. </para><para>The measurement error is estimated at +/- 1 usec. </para></description><typedef name="result_type"><type>unsigned int</type></typedef>
  2087. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  2088. <method-group name="public static functions">
  2089. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the <classname alt="boost::random::random_device">random_device</classname> can produce. </para></description></method>
  2090. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the <classname alt="boost::random::random_device">random_device</classname> can produce. </para></description></method>
  2091. </method-group>
  2092. <method-group name="public member functions">
  2093. <method name="entropy" cv="const"><type>double</type><description><para>Returns: An entropy estimate for the random numbers returned by operator(), in the range min() to log2( max()+1). A deterministic random number generator (e.g. a pseudo-random number engine) has entropy 0.</para><para>Throws: Nothing. </para></description></method>
  2094. <method name="operator()"><type>unsigned int</type><description><para>Returns a random value in the range [min, max]. </para></description></method>
  2095. <method name="generate"><type>void</type><template>
  2096. <template-type-parameter name="Iter"/>
  2097. </template><parameter name="begin"><paramtype>Iter</paramtype></parameter><parameter name="end"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random 32-bit values. </para></description></method>
  2098. </method-group>
  2099. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::random_device">random_device</classname></computeroutput>, optionally using the default device. </para></description></constructor>
  2100. <constructor specifiers="explicit"><parameter name="token"><paramtype>const std::string &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::random_device">random_device</classname></computeroutput>, optionally using the given token as an access specification (for example, a URL) to some implementation-defined service for monitoring a stochastic process. </para></description></constructor>
  2101. <destructor/>
  2102. </class>
  2103. </namespace>
  2104. </namespace>
  2105. </header>
  2106. <header name="boost/random/random_number_generator.hpp">
  2107. <namespace name="boost">
  2108. <namespace name="random">
  2109. <class name="random_number_generator"><template>
  2110. <template-type-parameter name="URNG"/>
  2111. <template-type-parameter name="IntType"><default>long</default></template-type-parameter>
  2112. </template><description><para>Instantiations of class template <classname alt="boost::random::random_number_generator">random_number_generator</classname> model a RandomNumberGenerator (std:25.2.11 [lib.alg.random.shuffle]). On each invocation, it returns a uniformly distributed integer in the range [0..n).</para><para>The template parameter IntType shall denote some integer-like value type. </para></description><typedef name="base_type"><type>URNG</type></typedef>
  2113. <typedef name="argument_type"><type>IntType</type></typedef>
  2114. <typedef name="result_type"><type>IntType</type></typedef>
  2115. <method-group name="public member functions">
  2116. <method name="operator()"><type>result_type</type><parameter name="n"><paramtype>argument_type</paramtype></parameter><description><para>Returns a value in the range [0, n) </para></description></method>
  2117. </method-group>
  2118. <constructor><parameter name="rng"><paramtype>base_type &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::random_number_generator">random_number_generator</classname> functor with the given <link linkend="boost_random.reference.concepts.uniform_random_number_generator">uniform random number generator</link> as the underlying source of random numbers. </para></description></constructor>
  2119. </class>
  2120. </namespace>
  2121. </namespace>
  2122. </header>
  2123. <header name="boost/random/ranlux.hpp">
  2124. <namespace name="boost">
  2125. <namespace name="random">
  2126. <typedef name="ranlux_base"><type><classname>subtract_with_carry_engine</classname>&lt; uint32_t, 24, 10, 24 &gt;</type></typedef>
  2127. <typedef name="ranlux_base_01"><type><classname>subtract_with_carry_01_engine</classname>&lt; float, 24, 10, 24 &gt;</type></typedef>
  2128. <typedef name="ranlux64_base_01"><type><classname>subtract_with_carry_01_engine</classname>&lt; double, 48, 10, 24 &gt;</type></typedef>
  2129. <typedef name="ranlux3"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2130. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2131. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux_base</classname>, 223, 24 &gt;</type></typedef>
  2132. <typedef name="ranlux4"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2133. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2134. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux_base</classname>, 389, 24 &gt;</type></typedef>
  2135. <typedef name="ranlux3_01"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2136. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2137. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux_base_01</classname>, 223, 24 &gt;</type></typedef>
  2138. <typedef name="ranlux4_01"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2139. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2140. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux_base_01</classname>, 389, 24 &gt;</type></typedef>
  2141. <typedef name="ranlux64_3_01"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2142. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2143. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux64_base_01</classname>, 223, 24 &gt;</type></typedef>
  2144. <typedef name="ranlux64_4_01"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2145. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2146. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux64_base_01</classname>, 389, 24 &gt;</type></typedef>
  2147. <typedef name="ranlux64_base"><type><classname>subtract_with_carry_engine</classname>&lt; uint64_t, 48, 10, 24 &gt;</type></typedef>
  2148. <typedef name="ranlux64_3"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2149. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2150. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux64_base</classname>, 223, 24 &gt;</type></typedef>
  2151. <typedef name="ranlux64_4"><description><para>The ranlux family of generators are described in</para><para> <blockquote><para> "A portable high-quality random number generator for lattice field theory
  2152. calculations", M. Luescher, Computer Physics Communications, 79 (1994) pp 100-110. </para></blockquote> </para><para>The levels are given in</para><para> <blockquote><para> "RANLUX: A Fortran implementation of the high-quality
  2153. pseudorandom number generator of Luescher", F. James, Computer Physics Communications 79 (1994) 111-114 </para></blockquote> </para></description><type><classname>discard_block_engine</classname>&lt; <classname>ranlux64_base</classname>, 389, 24 &gt;</type></typedef>
  2154. <typedef name="ranlux24_base"><type><classname>subtract_with_carry_engine</classname>&lt; uint32_t, 24, 10, 24 &gt;</type></typedef>
  2155. <typedef name="ranlux48_base"><type><classname>subtract_with_carry_engine</classname>&lt; uint64_t, 48, 5, 12 &gt;</type></typedef>
  2156. <typedef name="ranlux24"><type><classname>discard_block_engine</classname>&lt; <classname>ranlux24_base</classname>, 223, 23 &gt;</type></typedef>
  2157. <typedef name="ranlux48"><type><classname>discard_block_engine</classname>&lt; <classname>ranlux48_base</classname>, 389, 11 &gt;</type></typedef>
  2158. </namespace>
  2159. </namespace>
  2160. </header>
  2161. <header name="boost/random/seed_seq.hpp">
  2162. <namespace name="boost">
  2163. <namespace name="random">
  2164. <class name="seed_seq"><description><para>The class <computeroutput><classname alt="boost::random::seed_seq">seed_seq</classname></computeroutput> stores a sequence of 32-bit words for seeding a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . These words will be combined to fill the entire state of the generator. </para></description><typedef name="result_type"><type>boost::uint_least32_t</type></typedef>
  2165. <method-group name="public member functions">
  2166. <method name="generate" cv="const"><type>void</type><template>
  2167. <template-type-parameter name="Iter"/>
  2168. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with 32-bit values based on the stored sequence.</para><para>Requires: Iter must be a Random Access Iterator whose value type is an unsigned integral type at least 32 bits wide. </para></description></method>
  2169. <method name="size" cv="const"><type>std::size_t</type><description><para>Returns the size of the sequence. </para></description></method>
  2170. <method name="param"><type>void</type><template>
  2171. <template-type-parameter name="Iter"/>
  2172. </template><parameter name="out"><paramtype>Iter</paramtype></parameter><description><para>Writes the stored sequence to iter. </para></description></method>
  2173. </method-group>
  2174. <constructor><description><para>Initializes a <classname alt="boost::random::seed_seq">seed_seq</classname> to hold an empty sequence. </para></description></constructor>
  2175. <constructor><template>
  2176. <template-type-parameter name="T"/>
  2177. </template><parameter name="il"><paramtype>const std::initializer_list&lt; T &gt; &amp;</paramtype></parameter><description><para>Initializes the sequence from an initializer_list. </para></description></constructor>
  2178. <constructor><template>
  2179. <template-type-parameter name="Iter"/>
  2180. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Initializes the sequence from an iterator range. </para></description></constructor>
  2181. <constructor specifiers="explicit"><template>
  2182. <template-type-parameter name="Range"/>
  2183. </template><parameter name="range"><paramtype>const Range &amp;</paramtype></parameter><description><para>Initializes the sequence from Boost.Range range. </para></description></constructor>
  2184. </class>
  2185. </namespace>
  2186. </namespace>
  2187. </header>
  2188. <header name="boost/random/shuffle_order.hpp">
  2189. <namespace name="boost">
  2190. <namespace name="random">
  2191. <class name="shuffle_order_engine"><template>
  2192. <template-type-parameter name="UniformRandomNumberGenerator"/>
  2193. <template-nontype-parameter name="k"><type>std::size_t</type></template-nontype-parameter>
  2194. </template><description><para>Instatiations of class template <computeroutput><classname alt="boost::random::shuffle_order_engine">shuffle_order_engine</classname></computeroutput> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . It mixes the output of some (usually <classname alt="boost::random::linear_congruential_engine">linear_congruential_engine</classname>) <link linkend="boost_random.reference.concepts.uniform_random_number_generator">uniform random number generator</link> to get better statistical properties. The algorithm is described in</para><para> <blockquote><para> "Improving a poor random number generator", Carter Bays and S.D. Durham, ACM Transactions on Mathematical Software, Vol 2, No. 1, March 1976, pp. 59-64. <ulink url="http://doi.acm.org/10.1145/355666.355670">http://doi.acm.org/10.1145/355666.355670</ulink> </para></blockquote> </para><para>The output of the base generator is buffered in an array of length k. Every output X(n) has a second role: It gives an index into the array where X(n+1) will be retrieved. Used array elements are replaced with fresh output from the base generator.</para><para>Template parameters are the base generator and the array length k, which should be around 100. </para></description><typedef name="base_type"><type>UniformRandomNumberGenerator</type></typedef>
  2195. <typedef name="result_type"><type>base_type::result_type</type></typedef>
  2196. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  2197. <data-member name="buffer_size" specifiers="static"><type>const std::size_t</type></data-member>
  2198. <data-member name="table_size" specifiers="static"><type>const std::size_t</type></data-member>
  2199. <method-group name="public member functions">
  2200. <method name="seed"><type>void</type></method>
  2201. <method name="seed"><type>void</type><parameter name="seed"><paramtype>result_type</paramtype></parameter><description><para>Invokes the one-argument seed method of the base generator with the parameter seed and re-initializes the internal buffer array.</para><para>Complexity: Exactly k+1 invocations of the base generator. </para></description></method>
  2202. <method name="seed"><type>void</type><template>
  2203. <template-type-parameter name="SeedSeq"/>
  2204. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Invokes the one-argument seed method of the base generator with the parameter seq and re-initializes the internal buffer array.</para><para>Complexity: Exactly k+1 invocations of the base generator. </para></description></method>
  2205. <method name="seed"><type>void</type><template>
  2206. <template-type-parameter name="It"/>
  2207. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter></method>
  2208. <method name="base" cv="const"><type>const base_type &amp;</type></method>
  2209. <method name="operator()"><type>result_type</type></method>
  2210. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the generator by z steps. </para></description></method>
  2211. <method name="generate"><type>void</type><template>
  2212. <template-type-parameter name="Iter"/>
  2213. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with pseudo-random values. </para></description></method>
  2214. </method-group>
  2215. <constructor><description><para>Constructs a <computeroutput><classname alt="boost::random::shuffle_order_engine">shuffle_order_engine</classname></computeroutput> by invoking the default constructor of the base generator.</para><para>Complexity: Exactly k+1 invocations of the base generator. </para></description></constructor>
  2216. <constructor specifiers="explicit"><parameter name="s"><paramtype>result_type</paramtype></parameter><description><para>Constructs a <computeroutput>shuffle_output_engine</computeroutput> by invoking the one-argument constructor of the base generator with the parameter seed.</para><para>Complexity: Exactly k+1 invocations of the base generator. </para></description></constructor>
  2217. <constructor specifiers="explicit"><template>
  2218. <template-type-parameter name="SeedSeq"/>
  2219. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter></constructor>
  2220. <constructor specifiers="explicit"><parameter name="rng"><paramtype>const base_type &amp;</paramtype></parameter><description><para>Constructs a <computeroutput>shuffle_output_engine</computeroutput> by using a copy of the provided generator.</para><para>Precondition: The template argument UniformRandomNumberGenerator shall denote a CopyConstructible type.</para><para>Complexity: Exactly k+1 invocations of the base generator. </para></description></constructor>
  2221. <constructor specifiers="explicit"><parameter name="rng"><paramtype>base_type &amp;&amp;</paramtype></parameter></constructor>
  2222. <constructor><template>
  2223. <template-type-parameter name="It"/>
  2224. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter></constructor>
  2225. <method-group name="public static functions">
  2226. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  2227. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  2228. </method-group>
  2229. <method-group name="friend functions">
  2230. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2231. <template-type-parameter name="CharT"/>
  2232. <template-type-parameter name="Traits"/>
  2233. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>shuffle_order_engine</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::shuffle_order_engine">shuffle_order_engine</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2234. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2235. <template-type-parameter name="CharT"/>
  2236. <template-type-parameter name="Traits"/>
  2237. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>shuffle_order_engine</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::shuffle_order_engine">shuffle_order_engine</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2238. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>shuffle_order_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>shuffle_order_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences. </para></description></method>
  2239. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>shuffle_order_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>shuffle_order_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences. </para></description></method>
  2240. </method-group>
  2241. </class><typedef name="kreutzer1986"><description><para>According to Harry Erwin (private e-mail), the specialization <computeroutput>kreutzer1986</computeroutput> was suggested in:</para><para> <blockquote><para> "System Simulation: Programming Styles and Languages (International
  2242. Computer Science Series)", Wolfgang Kreutzer, Addison-Wesley, December 1986. </para></blockquote> </para></description><type><classname>shuffle_order_engine</classname>&lt; <classname>linear_congruential_engine</classname>&lt; uint32_t, 1366, 150889, 714025 &gt;, 97 &gt;</type></typedef>
  2243. <typedef name="knuth_b"><description><para>The specialization <computeroutput>knuth_b</computeroutput> is specified by the C++ standard. It is described in</para><para> <blockquote><para> "The Art of Computer Programming, Second Edition, Volume 2,
  2244. Seminumerical Algorithms", Donald Knuth, Addison-Wesley, 1981. </para></blockquote> </para></description><type><classname>shuffle_order_engine</classname>&lt; <classname>minstd_rand0</classname>, 256 &gt;</type></typedef>
  2245. </namespace>
  2246. </namespace>
  2247. </header>
  2248. <header name="boost/random/sobol.hpp">
  2249. <namespace name="boost">
  2250. <namespace name="random">
  2251. <class name="sobol_engine"><template>
  2252. <template-type-parameter name="UIntType"/>
  2253. <template-nontype-parameter name="w"><type>unsigned</type></template-nontype-parameter>
  2254. <template-type-parameter name="SobolTables"><default>default_sobol_table</default></template-type-parameter>
  2255. </template><description><para>Instantiations of class template <classname alt="boost::random::sobol_engine">sobol_engine</classname> model a <link linkend="boost_random.reference.concepts.quasi_random_number_generator">quasi-random number generator</link> . The <classname alt="boost::random::sobol_engine">sobol_engine</classname> uses the algorithm described in <blockquote><para> [Bratley+Fox, TOMS 14, 88 (1988)] and [Antonov+Saleev, USSR Comput. Maths. Math. Phys. 19, 252 (1980)] </para></blockquote> </para><para><note><para><classname alt="boost::random::sobol_engine">sobol_engine</classname> skips trivial zeroes at the start of the sequence. For example, the beginning of the 2-dimensional Sobol sequence in <computeroutput><classname alt="boost::random::uniform_01">uniform_01</classname></computeroutput> distribution will look like this: <programlisting language="c++">0.5, 0.5,
  2256. 0.75, 0.25,
  2257. 0.25, 0.75,
  2258. 0.375, 0.375,
  2259. 0.875, 0.875,
  2260. ...
  2261. </programlisting></para>
  2262. </note>
  2263. In the following documentation <computeroutput>X</computeroutput> denotes the concrete class of the template <classname alt="boost::random::sobol_engine">sobol_engine</classname> returning objects of type <computeroutput>UIntType</computeroutput>, u and v are the values of <computeroutput>X</computeroutput>.</para><para>Some member functions may throw exceptions of type <computeroutput>std::range_error</computeroutput>. This happens when the quasi-random domain is exhausted and the generator cannot produce any more values. The length of the low discrepancy sequence is given by <inlineequation><alt>$L=Dimension \times (2^{w} - 1)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_31.png"/></imageobject><textobject role="tex"><phrase>$L=Dimension \times (2^{w} - 1)$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><typedef name="result_type"><type>UIntType</type></typedef>
  2264. <method-group name="public member functions">
  2265. <method name="dimension" cv="const"><type>std::size_t</type><description><para>Returns: The dimension of of the quasi-random domain.</para><para>Throws: nothing. </para></description></method>
  2266. <method name="seed"><type>void</type><purpose>Throws: nothing. </purpose><description><para>Effects: Resets the quasi-random number generator state to the one given by the default construction. Equivalent to u.seed(0). </para></description></method>
  2267. <method name="seed"><type>void</type><parameter name="init"><paramtype>UIntType</paramtype></parameter><purpose>Throws: range_error. </purpose><description><para>Effects: Effectively sets the quasi-random number generator state to the <computeroutput>init</computeroutput>-th vector in the <computeroutput>s</computeroutput>-dimensional quasi-random domain, where <computeroutput>s</computeroutput> == X::dimension(). <programlisting language="c++">X u, v;
  2268. for(int i = 0; i &lt; N; ++i)
  2269. for( std::size_t j = 0; j &lt; u.dimension(); ++j )
  2270. u();
  2271. v.seed(N);
  2272. assert(u() == v());
  2273. </programlisting> </para></description></method>
  2274. <method name="operator()"><type>result_type</type><description><para>Returns: Returns a successive element of an <computeroutput>s</computeroutput>-dimensional (s = X::dimension()) vector at each invocation. When all elements are exhausted, X::operator() begins anew with the starting element of a subsequent <computeroutput>s</computeroutput>-dimensional vector.</para><para>Throws: range_error. </para></description></method>
  2275. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Effects: Advances *this state as if <computeroutput>z</computeroutput> consecutive X::operator() invocations were executed. <programlisting language="c++">X u = v;
  2276. for(int i = 0; i &lt; N; ++i)
  2277. u();
  2278. v.discard(N);
  2279. assert(u() == v());
  2280. </programlisting></para><para>Throws: range_error. </para></description></method>
  2281. </method-group>
  2282. <constructor specifiers="explicit"><parameter name="s"><paramtype>std::size_t</paramtype></parameter><description><para>Effects: Constructs the default <computeroutput>s</computeroutput>-dimensional Sobol quasi-random number generator.</para><para>Throws: bad_alloc, invalid_argument, range_error. </para></description></constructor>
  2283. <method-group name="public static functions">
  2284. <method name="min" specifiers="static"><type>constexpr result_type</type><description><para>Returns: Tight lower bound on the set of values returned by operator().</para><para>Throws: nothing. </para></description></method>
  2285. <method name="max" specifiers="static"><type>constexpr result_type</type><description><para>Returns: Tight upper bound on the set of values returned by operator().</para><para>Throws: nothing. </para></description></method>
  2286. </method-group>
  2287. <method-group name="friend functions">
  2288. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>sobol_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>sobol_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of outputs. </para></description></method>
  2289. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>sobol_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>sobol_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of outputs. </para></description></method>
  2290. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2291. <template-type-parameter name="CharT"/>
  2292. <template-type-parameter name="Traits"/>
  2293. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>sobol_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2294. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2295. <template-type-parameter name="CharT"/>
  2296. <template-type-parameter name="Traits"/>
  2297. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>sobol_engine</classname> &amp;</paramtype></parameter><description><para>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2298. </method-group>
  2299. </class><typedef name="sobol"><description><para><note><para>This specialization of <classname alt="boost::random::sobol_engine">sobol_engine</classname> supports up to 3667 dimensions.</para>
  2300. </note>
  2301. Data on the primitive binary polynomials <computeroutput>a</computeroutput> and the corresponding starting values <computeroutput>m</computeroutput> for Sobol sequences in up to 21201 dimensions was taken from</para><para> <blockquote><para> S. Joe and F. Y. Kuo, Constructing Sobol sequences with better two-dimensional projections, SIAM J. Sci. Comput. 30, 2635-2654 (2008). </para></blockquote> </para><para>See the original tables up to dimension 21201: <ulink url="https://web.archive.org/web/20170802022909/http://web.maths.unsw.edu.au/~fkuo/sobol/new-joe-kuo-6.21201">https://web.archive.org/web/20170802022909/http://web.maths.unsw.edu.au/~fkuo/sobol/new-joe-kuo-6.21201</ulink></para><para>For practical reasons the default table uses only the subset of binary polynomials <computeroutput>a</computeroutput> &lt; 2<superscript>16</superscript>.</para><para>However, it is possible to provide your own table to <classname alt="boost::random::sobol_engine">sobol_engine</classname> should the default one be insufficient. </para></description><type><classname>sobol_engine</classname>&lt; boost::uint_least64_t, 64u, default_sobol_table &gt;</type></typedef>
  2302. </namespace>
  2303. </namespace>
  2304. </header>
  2305. <header name="boost/random/student_t_distribution.hpp">
  2306. <namespace name="boost">
  2307. <namespace name="random">
  2308. <class name="student_t_distribution"><template>
  2309. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  2310. </template><description><para>The Student t distribution is a real valued distribution with one parameter n, the number of degrees of freedom.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \frac{1}{\sqrt{n\pi}} \frac{\Gamma((n+1)/2)}{\Gamma(n/2)} \left(1+\frac{x^2}{n}\right)^{-(n+1)/2} $</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_37.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{1}{\sqrt{n\pi}} \frac{\Gamma((n+1)/2)}{\Gamma(n/2)} \left(1+\frac{x^2}{n}\right)^{-(n+1)/2} $</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>student_t_distribution</classname></type></typedef>
  2311. <method-group name="public member functions">
  2312. <method name="n" cv="const"><type>RealType</type><description><para>Returns the number of degrees of freedom of the distribution. </para></description></method>
  2313. </method-group>
  2314. <constructor specifiers="explicit"><parameter name="n"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::student_t_distribution::param_type">param_type</classname></computeroutput> with "n" degrees of freedom.</para><para>Requires: n &gt; 0 </para></description></constructor>
  2315. <method-group name="friend functions">
  2316. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2317. <template-type-parameter name="CharT"/>
  2318. <template-type-parameter name="Traits"/>
  2319. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::student_t_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2320. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2321. <template-type-parameter name="CharT"/>
  2322. <template-type-parameter name="Traits"/>
  2323. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::student_t_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2324. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  2325. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  2326. </method-group>
  2327. </class><typedef name="result_type"><type>RealType</type></typedef>
  2328. <typedef name="input_type"><type>RealType</type></typedef>
  2329. <method-group name="public member functions">
  2330. <method name="operator()"><type>RealType</type><template>
  2331. <template-type-parameter name="URNG"/>
  2332. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the Student t distribution. </para></description></method>
  2333. <method name="operator()" cv="const"><type>RealType</type><template>
  2334. <template-type-parameter name="URNG"/>
  2335. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed accordint to the Student t distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  2336. <method name="n" cv="const"><type>RealType</type><description><para>Returns the number of degrees of freedom. </para></description></method>
  2337. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  2338. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  2339. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2340. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  2341. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2342. </method-group>
  2343. <constructor specifiers="explicit"><parameter name="n"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::student_t_distribution">student_t_distribution</classname></computeroutput> with "n" degrees of freedom.</para><para>Requires: n &gt; 0 </para></description></constructor>
  2344. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs an <computeroutput><classname alt="boost::random::student_t_distribution">student_t_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  2345. <method-group name="friend functions">
  2346. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2347. <template-type-parameter name="CharT"/>
  2348. <template-type-parameter name="Traits"/>
  2349. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="td"><paramtype>const <classname>student_t_distribution</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::student_t_distribution">student_t_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2350. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2351. <template-type-parameter name="CharT"/>
  2352. <template-type-parameter name="Traits"/>
  2353. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="td"><paramtype>const <classname>student_t_distribution</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::student_t_distribution">student_t_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2354. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>student_t_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>student_t_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::student_t_distribution">student_t_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  2355. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>student_t_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>student_t_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::student_t_distribution">student_t_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  2356. </method-group>
  2357. </class>
  2358. </namespace>
  2359. </namespace>
  2360. </header>
  2361. <header name="boost/random/subtract_with_carry.hpp">
  2362. <namespace name="boost">
  2363. <namespace name="random">
  2364. <class name="subtract_with_carry_01_engine"><template>
  2365. <template-type-parameter name="RealType"/>
  2366. <template-nontype-parameter name="w"><type>std::size_t</type></template-nontype-parameter>
  2367. <template-nontype-parameter name="s"><type>std::size_t</type></template-nontype-parameter>
  2368. <template-nontype-parameter name="r"><type>std::size_t</type></template-nontype-parameter>
  2369. </template><description><para>Instantiations of <classname alt="boost::random::subtract_with_carry_01_engine">subtract_with_carry_01_engine</classname> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . The algorithm is described in</para><para> <blockquote><para> "A New Class of Random Number Generators", George Marsaglia and Arif Zaman, Annals of Applied Probability, Volume 1, Number 3 (1991), 462-480. </para></blockquote> </para></description><typedef name="result_type"><type>RealType</type></typedef>
  2370. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  2371. <data-member name="word_size" specifiers="static"><type>const std::size_t</type></data-member>
  2372. <data-member name="long_lag" specifiers="static"><type>const std::size_t</type></data-member>
  2373. <data-member name="short_lag" specifiers="static"><type>const std::size_t</type></data-member>
  2374. <data-member name="default_seed" specifiers="static"><type>const boost::uint32_t</type></data-member>
  2375. <method-group name="public member functions">
  2376. <method name="seed"><type>void</type><description><para>Seeds the generator with the default seed. </para></description></method>
  2377. <method name="seed"><type>void</type><parameter name="value"><paramtype>boost::uint32_t</paramtype></parameter><description><para>Seeds the generator with <computeroutput>value</computeroutput>. </para></description></method>
  2378. <method name="seed"><type>void</type><template>
  2379. <template-type-parameter name="SeedSeq"/>
  2380. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds the generator with values produced by <computeroutput>seq.generate()</computeroutput>. </para></description></method>
  2381. <method name="seed"><type>void</type><template>
  2382. <template-type-parameter name="It"/>
  2383. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds the generator with values from a range. Updates first to point one past the last consumed element. If there are not enough elements in the range to fill the entire state, throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></method>
  2384. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  2385. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  2386. <method name="generate"><type>void</type><template>
  2387. <template-type-parameter name="Iter"/>
  2388. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values. </para></description></method>
  2389. </method-group>
  2390. <constructor><description><para>Creates a new <classname alt="boost::random::subtract_with_carry_01_engine">subtract_with_carry_01_engine</classname> using the default seed. </para></description></constructor>
  2391. <constructor specifiers="explicit"><parameter name="value"><paramtype>boost::uint32_t</paramtype></parameter><description><para>Creates a new <classname alt="boost::random::subtract_with_carry_01_engine">subtract_with_carry_01_engine</classname> and seeds it with value. </para></description></constructor>
  2392. <constructor specifiers="explicit"><template>
  2393. <template-type-parameter name="SeedSeq"/>
  2394. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Creates a new <classname alt="boost::random::subtract_with_carry_01_engine">subtract_with_carry_01_engine</classname> and seeds with values produced by seq.generate(). </para></description></constructor>
  2395. <constructor><template>
  2396. <template-type-parameter name="It"/>
  2397. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Creates a new <classname alt="boost::random::subtract_with_carry_01_engine">subtract_with_carry_01_engine</classname> and seeds it with values from a range. Advances first to point one past the last consumed value. If the range does not contain enough elements to fill the entire state, throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></constructor>
  2398. <method-group name="public static functions">
  2399. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  2400. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  2401. </method-group>
  2402. <method-group name="friend functions">
  2403. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2404. <template-type-parameter name="CharT"/>
  2405. <template-type-parameter name="Traits"/>
  2406. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>subtract_with_carry_01_engine</classname> &amp;</paramtype></parameter><description><para>Writes a <classname alt="boost::random::subtract_with_carry_01_engine">subtract_with_carry_01_engine</classname> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2407. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2408. <template-type-parameter name="CharT"/>
  2409. <template-type-parameter name="Traits"/>
  2410. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>subtract_with_carry_01_engine</classname> &amp;</paramtype></parameter><description><para>Reads a <classname alt="boost::random::subtract_with_carry_01_engine">subtract_with_carry_01_engine</classname> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2411. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>subtract_with_carry_01_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>subtract_with_carry_01_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences. </para></description></method>
  2412. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>subtract_with_carry_01_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>subtract_with_carry_01_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences. </para></description></method>
  2413. </method-group>
  2414. </class><class name="subtract_with_carry_engine"><template>
  2415. <template-type-parameter name="IntType"/>
  2416. <template-nontype-parameter name="w"><type>std::size_t</type></template-nontype-parameter>
  2417. <template-nontype-parameter name="s"><type>std::size_t</type></template-nontype-parameter>
  2418. <template-nontype-parameter name="r"><type>std::size_t</type></template-nontype-parameter>
  2419. </template><description><para>Instantiations of <computeroutput><classname alt="boost::random::subtract_with_carry_engine">subtract_with_carry_engine</classname></computeroutput> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . The algorithm is described in</para><para> <blockquote><para> "A New Class of Random Number Generators", George Marsaglia and Arif Zaman, Annals of Applied Probability, Volume 1, Number 3 (1991), 462-480. </para></blockquote> </para></description><typedef name="result_type"><type>IntType</type></typedef>
  2420. <data-member name="word_size" specifiers="static"><type>const std::size_t</type></data-member>
  2421. <data-member name="long_lag" specifiers="static"><type>const std::size_t</type></data-member>
  2422. <data-member name="short_lag" specifiers="static"><type>const std::size_t</type></data-member>
  2423. <data-member name="default_seed" specifiers="static"><type>const uint32_t</type></data-member>
  2424. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  2425. <data-member name="modulus" specifiers="static"><type>const result_type</type></data-member>
  2426. <method-group name="public member functions">
  2427. <method name="seed"><type>void</type><description><para>Seeds the generator with the default seed. </para></description></method>
  2428. <method name="seed"><type>void</type><parameter name="value"><paramtype>IntType</paramtype></parameter></method>
  2429. <method name="seed"><type>void</type><template>
  2430. <template-type-parameter name="SeedSeq"/>
  2431. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Seeds the generator with values produced by <computeroutput>seq.generate()</computeroutput>. </para></description></method>
  2432. <method name="seed"><type>void</type><template>
  2433. <template-type-parameter name="It"/>
  2434. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Seeds the generator with values from a range. Updates <computeroutput>first</computeroutput> to point one past the last consumed value. If the range does not contain enough elements to fill the entire state of the generator, throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></method>
  2435. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  2436. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  2437. <method name="generate"><type>void</type><template>
  2438. <template-type-parameter name="It"/>
  2439. </template><parameter name="first"><paramtype>It</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Fills a range with random values. </para></description></method>
  2440. </method-group>
  2441. <constructor><description><para>Constructs a new <computeroutput><classname alt="boost::random::subtract_with_carry_engine">subtract_with_carry_engine</classname></computeroutput> and seeds it with the default seed. </para></description></constructor>
  2442. <constructor specifiers="explicit"><parameter name="value"><paramtype>IntType</paramtype></parameter><description><para>Constructs a new <computeroutput><classname alt="boost::random::subtract_with_carry_engine">subtract_with_carry_engine</classname></computeroutput> and seeds it with <computeroutput>value</computeroutput>. </para></description></constructor>
  2443. <constructor specifiers="explicit"><template>
  2444. <template-type-parameter name="SeedSeq"/>
  2445. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs a new <computeroutput><classname alt="boost::random::subtract_with_carry_engine">subtract_with_carry_engine</classname></computeroutput> and seeds it with values produced by <computeroutput>seq.generate()</computeroutput>. </para></description></constructor>
  2446. <constructor><template>
  2447. <template-type-parameter name="It"/>
  2448. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Constructs a new <computeroutput><classname alt="boost::random::subtract_with_carry_engine">subtract_with_carry_engine</classname></computeroutput> and seeds it with values from a range. first is updated to point one past the last value consumed. If there are not enough elements in the range to fill the entire state of the generator, throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></constructor>
  2449. <method-group name="public static functions">
  2450. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  2451. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  2452. </method-group>
  2453. <method-group name="friend functions">
  2454. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2455. <template-type-parameter name="CharT"/>
  2456. <template-type-parameter name="Traits"/>
  2457. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>subtract_with_carry_engine</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::subtract_with_carry_engine">subtract_with_carry_engine</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2458. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2459. <template-type-parameter name="CharT"/>
  2460. <template-type-parameter name="Traits"/>
  2461. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="f"><paramtype>const <classname>subtract_with_carry_engine</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::subtract_with_carry_engine">subtract_with_carry_engine</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2462. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>subtract_with_carry_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>subtract_with_carry_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences of values. </para></description></method>
  2463. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>subtract_with_carry_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>subtract_with_carry_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences of values. </para></description></method>
  2464. </method-group>
  2465. </class>
  2466. </namespace>
  2467. </namespace>
  2468. </header>
  2469. <header name="boost/random/taus88.hpp">
  2470. <namespace name="boost">
  2471. <namespace name="random">
  2472. <typedef name="taus88"><description><para>The specialization taus88 was suggested in</para><para> <blockquote><para> "Maximally Equidistributed Combined Tausworthe Generators", Pierre L'Ecuyer, Mathematics of Computation, Volume 65, Number 213, January 1996, Pages 203-213 </para></blockquote> </para></description><type><classname>xor_combine_engine</classname>&lt; <classname>xor_combine_engine</classname>&lt; <classname>linear_feedback_shift_engine</classname>&lt; uint32_t, 32, 31, 13, 12 &gt;, 0, <classname>linear_feedback_shift_engine</classname>&lt; uint32_t, 32, 29, 2, 4 &gt;, 0 &gt;, 0, <classname>linear_feedback_shift_engine</classname>&lt; uint32_t, 32, 28, 3, 17 &gt;, 0 &gt;</type></typedef>
  2473. </namespace>
  2474. </namespace>
  2475. </header>
  2476. <header name="boost/random/traits.hpp">
  2477. <namespace name="boost">
  2478. <namespace name="random">
  2479. <namespace name="traits">
  2480. <struct name="is_integral"><template>
  2481. <template-type-parameter name="T"/>
  2482. </template><inherit access="public">mpl::bool_&lt; boost::is_integral&lt; T &gt;::value||(std::numeric_limits&lt; T &gt;::is_integer)&gt;</inherit><purpose>Traits class that indicates whether type T is an integer. </purpose></struct><struct name="is_signed"><template>
  2483. <template-type-parameter name="T"/>
  2484. </template><inherit access="public">mpl::bool_&lt; boost::is_signed&lt; T &gt;::value||(std::numeric_limits&lt; T &gt;::is_specialized &amp;&amp;std::numeric_limits&lt; T &gt;::is_integer &amp;&amp;std::numeric_limits&lt; T &gt;::is_signed)&gt;</inherit><purpose>Traits class that indicates whether type T is a signed integer. </purpose></struct><struct name="make_unsigned"><template>
  2485. <template-type-parameter name="T"/>
  2486. </template><purpose>Converts the argument type T to an unsigned type. </purpose><description><para>This trait has a single member <computeroutput>type</computeroutput> which is the unsigned type corresponding to T. Note that if T is signed, then member <computeroutput>type</computeroutput> <emphasis>should define a type with one more bit precision than T</emphasis>. For built-in types this trait defaults to <computeroutput>boost::make_unsigned&lt;T&gt;::type</computeroutput>. For user defined types it simply asserts that the argument type T is an unsigned integer (using std::numeric_limits). User defined specializations may be provided for other cases. </para></description></struct><struct name="make_unsigned_or_unbounded"><template>
  2487. <template-type-parameter name="T"/>
  2488. </template><purpose>Converts the argument type T to either an unsigned type or an unbounded integer type. </purpose><description><para>This trait has a single member <computeroutput>type</computeroutput> which is either the unsigned type corresponding to T or an unbounded integer type. This trait is used to generate types suitable for the calculation of a range: as a result if T is signed, then member <computeroutput>type</computeroutput> <emphasis>should define a type with one more bit precision than T</emphasis>. For built-in types this trait defaults to <computeroutput>boost::make_unsigned&lt;T&gt;::type</computeroutput>. For user defined types it simply asserts that the argument type T is either an unbounded integer, or an unsigned one (using std::numeric_limits). User defined specializations may be provided for other cases. </para></description></struct></namespace>
  2489. </namespace>
  2490. </namespace>
  2491. </header>
  2492. <header name="boost/random/triangle_distribution.hpp">
  2493. <namespace name="boost">
  2494. <namespace name="random">
  2495. <class name="triangle_distribution"><template>
  2496. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  2497. </template><description><para>Instantiations of <computeroutput><classname alt="boost::random::triangle_distribution">triangle_distribution</classname></computeroutput> model a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . A <computeroutput><classname alt="boost::random::triangle_distribution">triangle_distribution</classname></computeroutput> has three parameters, <computeroutput>a</computeroutput>, <computeroutput>b</computeroutput>, and <computeroutput>c</computeroutput>, which are the smallest, the most probable and the largest values of the distribution respectively. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>triangle_distribution</classname></type></typedef>
  2498. <method-group name="public member functions">
  2499. <method name="a" cv="const"><type>RealType</type><description><para>Returns the minimum value of the distribution. </para></description></method>
  2500. <method name="b" cv="const"><type>RealType</type><description><para>Returns the mode of the distribution. </para></description></method>
  2501. <method name="c" cv="const"><type>RealType</type><description><para>Returns the maximum value of the distribution. </para></description></method>
  2502. </method-group>
  2503. <constructor specifiers="explicit"><parameter name="a"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="b"><paramtype>RealType</paramtype><default>0.5</default></parameter><parameter name="c"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs the parameters of a <computeroutput><classname alt="boost::random::triangle_distribution">triangle_distribution</classname></computeroutput>. </para></description></constructor>
  2504. <method-group name="friend functions">
  2505. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2506. <template-type-parameter name="CharT"/>
  2507. <template-type-parameter name="Traits"/>
  2508. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2509. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2510. <template-type-parameter name="CharT"/>
  2511. <template-type-parameter name="Traits"/>
  2512. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2513. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  2514. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  2515. </method-group>
  2516. </class><typedef name="input_type"><type>RealType</type></typedef>
  2517. <typedef name="result_type"><type>RealType</type></typedef>
  2518. <method-group name="public member functions">
  2519. <method name="a" cv="const"><type>result_type</type><description><para>Returns the <computeroutput>a</computeroutput> parameter of the distribution </para></description></method>
  2520. <method name="b" cv="const"><type>result_type</type><description><para>Returns the <computeroutput>b</computeroutput> parameter of the distribution </para></description></method>
  2521. <method name="c" cv="const"><type>result_type</type><description><para>Returns the <computeroutput>c</computeroutput> parameter of the distribution </para></description></method>
  2522. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  2523. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  2524. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2525. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  2526. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2527. <method name="operator()"><type>result_type</type><template>
  2528. <template-type-parameter name="Engine"/>
  2529. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the triangle distribution. </para></description></method>
  2530. <method name="operator()"><type>result_type</type><template>
  2531. <template-type-parameter name="Engine"/>
  2532. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the triangle distribution with parameters specified by param. </para></description></method>
  2533. </method-group>
  2534. <constructor specifiers="explicit"><parameter name="a"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="b"><paramtype>RealType</paramtype><default>0.5</default></parameter><parameter name="c"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::triangle_distribution">triangle_distribution</classname></computeroutput> with the parameters <computeroutput>a</computeroutput>, <computeroutput>b</computeroutput>, and <computeroutput>c</computeroutput>.</para><para>Preconditions: a &lt;= b &lt;= c. </para></description></constructor>
  2535. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::triangle_distribution">triangle_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  2536. <method-group name="friend functions">
  2537. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2538. <template-type-parameter name="CharT"/>
  2539. <template-type-parameter name="Traits"/>
  2540. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="td"><paramtype>const <classname>triangle_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2541. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2542. <template-type-parameter name="CharT"/>
  2543. <template-type-parameter name="Traits"/>
  2544. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="td"><paramtype>const <classname>triangle_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2545. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>triangle_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>triangle_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  2546. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>triangle_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>triangle_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values given equal generators. </para></description></method>
  2547. </method-group>
  2548. </class>
  2549. </namespace>
  2550. </namespace>
  2551. </header>
  2552. <header name="boost/random/uniform_01.hpp">
  2553. <namespace name="boost">
  2554. <namespace name="random">
  2555. <class name="uniform_01"><template>
  2556. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  2557. </template><description><para>The distribution function <classname alt="boost::random::uniform_01">uniform_01</classname> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . On each invocation, it returns a random floating-point value uniformly distributed in the range [0..1).</para><para>The template parameter RealType shall denote a float-like value type with support for binary operators +, -, and /.</para><para>Note: The current implementation is buggy, because it may not fill all of the mantissa with random bits. I'm unsure how to fill a (to-be-invented) <computeroutput>boost::bigfloat</computeroutput> class with random bits efficiently. It's probably time for a traits class. </para></description><typedef name="input_type"><type>RealType</type></typedef>
  2558. <typedef name="result_type"><type>RealType</type></typedef>
  2559. <method-group name="public member functions">
  2560. <method name="min" cv="const"><type>result_type</type></method>
  2561. <method name="max" cv="const"><type>result_type</type></method>
  2562. <method name="reset"><type>void</type></method>
  2563. <method name="operator()"><type>result_type</type><template>
  2564. <template-type-parameter name="Engine"/>
  2565. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter></method>
  2566. </method-group>
  2567. </class>
  2568. </namespace>
  2569. </namespace>
  2570. </header>
  2571. <header name="boost/random/uniform_int_distribution.hpp">
  2572. <namespace name="boost">
  2573. <namespace name="random">
  2574. <class name="uniform_int_distribution"><template>
  2575. <template-type-parameter name="IntType"><default>int</default></template-type-parameter>
  2576. </template><description><para>The class template <classname alt="boost::random::uniform_int_distribution">uniform_int_distribution</classname> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . On each invocation, it returns a random integer value uniformly distributed in the set of integers {min, min+1, min+2, ..., max}.</para><para>The template parameter IntType shall denote an integer-like value type. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>uniform_int_distribution</classname></type></typedef>
  2577. <method-group name="public member functions">
  2578. <method name="a" cv="const"><type>IntType</type><description><para>Returns the minimum value of the distribution. </para></description></method>
  2579. <method name="b" cv="const"><type>IntType</type><description><para>Returns the maximum value of the distribution. </para></description></method>
  2580. </method-group>
  2581. <constructor specifiers="explicit"><parameter name="min"><paramtype>IntType</paramtype><default>0</default></parameter><parameter name="max"><paramtype>IntType</paramtype><default>(std::numeric_limits&lt; IntType &gt;::max)()</default></parameter><description><para>Constructs the parameters of a <classname alt="boost::random::uniform_int_distribution">uniform_int_distribution</classname>.</para><para>Requires min &lt;= max </para></description></constructor>
  2582. <method-group name="friend functions">
  2583. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2584. <template-type-parameter name="CharT"/>
  2585. <template-type-parameter name="Traits"/>
  2586. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2587. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2588. <template-type-parameter name="CharT"/>
  2589. <template-type-parameter name="Traits"/>
  2590. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2591. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  2592. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  2593. </method-group>
  2594. </class><typedef name="input_type"><type>IntType</type></typedef>
  2595. <typedef name="result_type"><type>IntType</type></typedef>
  2596. <method-group name="public member functions">
  2597. <method name="min" cv="const"><type>IntType</type><description><para>Returns the minimum value of the distribution </para></description></method>
  2598. <method name="max" cv="const"><type>IntType</type><description><para>Returns the maximum value of the distribution </para></description></method>
  2599. <method name="a" cv="const"><type>IntType</type><description><para>Returns the minimum value of the distribution </para></description></method>
  2600. <method name="b" cv="const"><type>IntType</type><description><para>Returns the maximum value of the distribution </para></description></method>
  2601. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2602. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  2603. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2604. <method name="operator()" cv="const"><type>result_type</type><template>
  2605. <template-type-parameter name="Engine"/>
  2606. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns an integer uniformly distributed in the range [min, max]. </para></description></method>
  2607. <method name="operator()" cv="const"><type>result_type</type><template>
  2608. <template-type-parameter name="Engine"/>
  2609. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns an integer uniformly distributed in the range [param.a(), param.b()]. </para></description></method>
  2610. </method-group>
  2611. <constructor specifiers="explicit"><parameter name="min"><paramtype>IntType</paramtype><default>0</default></parameter><parameter name="max"><paramtype>IntType</paramtype><default>(std::numeric_limits&lt; IntType &gt;::max)()</default></parameter><description><para>Constructs a <classname alt="boost::random::uniform_int_distribution">uniform_int_distribution</classname>. <computeroutput>min</computeroutput> and <computeroutput>max</computeroutput> are the parameters of the distribution.</para><para>Requires: min &lt;= max </para></description></constructor>
  2612. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::uniform_int_distribution">uniform_int_distribution</classname> from its parameters. </para></description></constructor>
  2613. <method-group name="friend functions">
  2614. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2615. <template-type-parameter name="CharT"/>
  2616. <template-type-parameter name="Traits"/>
  2617. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ud"><paramtype>const <classname>uniform_int_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2618. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2619. <template-type-parameter name="CharT"/>
  2620. <template-type-parameter name="Traits"/>
  2621. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ud"><paramtype>const <classname>uniform_int_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2622. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_int_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_int_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  2623. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_int_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_int_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values given equal generators. </para></description></method>
  2624. </method-group>
  2625. </class>
  2626. </namespace>
  2627. </namespace>
  2628. </header>
  2629. <header name="boost/random/uniform_on_sphere.hpp">
  2630. <namespace name="boost">
  2631. <namespace name="random">
  2632. <class name="uniform_on_sphere"><template>
  2633. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  2634. <template-type-parameter name="Cont"><default>std::vector&lt;RealType&gt;</default></template-type-parameter>
  2635. </template><description><para>Instantiations of class template <classname alt="boost::random::uniform_on_sphere">uniform_on_sphere</classname> model a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . Such a distribution produces random numbers uniformly distributed on the unit sphere of arbitrary dimension <computeroutput>dim</computeroutput>. The <computeroutput>Cont</computeroutput> template parameter must be a STL-like container type with begin and end operations returning non-const ForwardIterators of type <computeroutput>Cont::iterator</computeroutput>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>uniform_on_sphere</classname></type></typedef>
  2636. <method-group name="public member functions">
  2637. <method name="dim" cv="const"><type>int</type><description><para>Returns the dimension of the sphere. </para></description></method>
  2638. </method-group>
  2639. <constructor specifiers="explicit"><parameter name="dim"><paramtype>int</paramtype><default>2</default></parameter><description><para>Constructs the parameters of a <classname alt="boost::random::uniform_on_sphere">uniform_on_sphere</classname> distribution, given the dimension of the sphere. </para></description></constructor>
  2640. <method-group name="friend functions">
  2641. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2642. <template-type-parameter name="CharT"/>
  2643. <template-type-parameter name="Traits"/>
  2644. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2645. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2646. <template-type-parameter name="CharT"/>
  2647. <template-type-parameter name="Traits"/>
  2648. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2649. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  2650. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  2651. </method-group>
  2652. </class><typedef name="input_type"><type>RealType</type></typedef>
  2653. <typedef name="result_type"><type>Cont</type></typedef>
  2654. <method-group name="public member functions">
  2655. <method name="dim" cv="const"><type>int</type><description><para>Returns the dimension of the sphere. </para></description></method>
  2656. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2657. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  2658. <method name="min" cv="const"><type>result_type</type><description><para>Returns the smallest value that the distribution can produce. Note that this is required to approximate the standard library's requirements. The behavior is defined according to lexicographical comparison so that for a container type of std::vector, dist.min() &lt;= x &lt;= dist.max() where x is any value produced by the distribution. </para></description></method>
  2659. <method name="max" cv="const"><type>result_type</type><description><para>Returns the largest value that the distribution can produce. Note that this is required to approximate the standard library's requirements. The behavior is defined according to lexicographical comparison so that for a container type of std::vector, dist.min() &lt;= x &lt;= dist.max() where x is any value produced by the distribution. </para></description></method>
  2660. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2661. <method name="operator()"><type>const result_type &amp;</type><template>
  2662. <template-type-parameter name="Engine"/>
  2663. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a point uniformly distributed over the surface of a sphere of dimension dim(). </para></description></method>
  2664. <method name="operator()" cv="const"><type>result_type</type><template>
  2665. <template-type-parameter name="Engine"/>
  2666. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a point uniformly distributed over the surface of a sphere of dimension param.dim(). </para></description></method>
  2667. </method-group>
  2668. <constructor specifiers="explicit"><parameter name="dim"><paramtype>int</paramtype><default>2</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::uniform_on_sphere">uniform_on_sphere</classname></computeroutput> distribution. <computeroutput>dim</computeroutput> is the dimension of the sphere.</para><para>Requires: dim &gt;= 0 </para></description></constructor>
  2669. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::uniform_on_sphere">uniform_on_sphere</classname></computeroutput> distribution from its parameters. </para></description></constructor>
  2670. <method-group name="friend functions">
  2671. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2672. <template-type-parameter name="CharT"/>
  2673. <template-type-parameter name="Traits"/>
  2674. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="sd"><paramtype>const <classname>uniform_on_sphere</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2675. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2676. <template-type-parameter name="CharT"/>
  2677. <template-type-parameter name="Traits"/>
  2678. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="sd"><paramtype>const <classname>uniform_on_sphere</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2679. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_on_sphere</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_on_sphere</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values, given equal generators. </para></description></method>
  2680. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_on_sphere</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_on_sphere</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values, given equal generators. </para></description></method>
  2681. </method-group>
  2682. </class>
  2683. </namespace>
  2684. </namespace>
  2685. </header>
  2686. <header name="boost/random/uniform_real_distribution.hpp">
  2687. <namespace name="boost">
  2688. <namespace name="random">
  2689. <class name="uniform_real_distribution"><template>
  2690. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  2691. </template><description><para>The class template <classname alt="boost::random::uniform_real_distribution">uniform_real_distribution</classname> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . On each invocation, it returns a random floating-point value uniformly distributed in the range [min..max). </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>uniform_real_distribution</classname></type></typedef>
  2692. <method-group name="public member functions">
  2693. <method name="a" cv="const"><type>RealType</type><description><para>Returns the minimum value of the distribution. </para></description></method>
  2694. <method name="b" cv="const"><type>RealType</type><description><para>Returns the maximum value of the distribution. </para></description></method>
  2695. </method-group>
  2696. <constructor specifiers="explicit"><parameter name="min"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="max"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs the parameters of a <classname alt="boost::random::uniform_real_distribution">uniform_real_distribution</classname>.</para><para>Requires min &lt;= max </para></description></constructor>
  2697. <method-group name="friend functions">
  2698. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2699. <template-type-parameter name="CharT"/>
  2700. <template-type-parameter name="Traits"/>
  2701. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2702. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2703. <template-type-parameter name="CharT"/>
  2704. <template-type-parameter name="Traits"/>
  2705. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2706. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  2707. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  2708. </method-group>
  2709. </class><typedef name="input_type"><type>RealType</type></typedef>
  2710. <typedef name="result_type"><type>RealType</type></typedef>
  2711. <method-group name="public member functions">
  2712. <method name="min" cv="const"><type>RealType</type><description><para>Returns the minimum value of the distribution </para></description></method>
  2713. <method name="max" cv="const"><type>RealType</type><description><para>Returns the maximum value of the distribution </para></description></method>
  2714. <method name="a" cv="const"><type>RealType</type><description><para>Returns the minimum value of the distribution </para></description></method>
  2715. <method name="b" cv="const"><type>RealType</type><description><para>Returns the maximum value of the distribution </para></description></method>
  2716. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2717. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  2718. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2719. <method name="operator()" cv="const"><type>result_type</type><template>
  2720. <template-type-parameter name="Engine"/>
  2721. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a value uniformly distributed in the range [min, max). </para></description></method>
  2722. <method name="operator()" cv="const"><type>result_type</type><template>
  2723. <template-type-parameter name="Engine"/>
  2724. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a value uniformly distributed in the range [param.a(), param.b()). </para></description></method>
  2725. </method-group>
  2726. <constructor specifiers="explicit"><parameter name="min"><paramtype>RealType</paramtype><default>0.0</default></parameter><parameter name="max"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <classname alt="boost::random::uniform_real_distribution">uniform_real_distribution</classname>. <computeroutput>min</computeroutput> and <computeroutput>max</computeroutput> are the parameters of the distribution.</para><para>Requires: min &lt;= max </para></description></constructor>
  2727. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <classname alt="boost::random::uniform_real_distribution">uniform_real_distribution</classname> from its parameters. </para></description></constructor>
  2728. <method-group name="friend functions">
  2729. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2730. <template-type-parameter name="CharT"/>
  2731. <template-type-parameter name="Traits"/>
  2732. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ud"><paramtype>const <classname>uniform_real_distribution</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2733. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2734. <template-type-parameter name="CharT"/>
  2735. <template-type-parameter name="Traits"/>
  2736. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ud"><paramtype>const <classname>uniform_real_distribution</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2737. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_real_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_real_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  2738. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_real_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_real_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values given equal generators. </para></description></method>
  2739. </method-group>
  2740. </class>
  2741. </namespace>
  2742. </namespace>
  2743. </header>
  2744. <header name="boost/random/uniform_smallint.hpp">
  2745. <namespace name="boost">
  2746. <namespace name="random">
  2747. <class name="uniform_smallint"><template>
  2748. <template-type-parameter name="IntType"><default>int</default></template-type-parameter>
  2749. </template><description><para>The distribution function <classname alt="boost::random::uniform_smallint">uniform_smallint</classname> models a <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . On each invocation, it returns a random integer value uniformly distributed in the set of integer numbers {min, min+1, min+2, ..., max}. It assumes that the desired range (max-min+1) is small compared to the range of the underlying source of random numbers and thus makes no attempt to limit quantization errors.</para><para>Let <inlineequation><alt>$r_{\mathtt{out}} = (\mbox{max}-\mbox{min}+1)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_38.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{out}} = (\mbox{max}-\mbox{min}+1)$</phrase></textobject></inlinemediaobject></inlineequation> the desired range of integer numbers, and let <inlineequation><alt>$r_{\mathtt{base}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_39.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{base}}$</phrase></textobject></inlinemediaobject></inlineequation> be the range of the underlying source of random numbers. Then, for the uniform distribution, the theoretical probability for any number i in the range <inlineequation><alt>$r_{\mathtt{out}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_40.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{out}}$</phrase></textobject></inlinemediaobject></inlineequation> will be <inlineequation><alt>$\displaystyle p_{\mathtt{out}}(i) = \frac{1}{r_{\mathtt{out}}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_41.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p_{\mathtt{out}}(i) = \frac{1}{r_{\mathtt{out}}}$</phrase></textobject></inlinemediaobject></inlineequation>. Likewise, assume a uniform distribution on <inlineequation><alt>$r_{\mathtt{base}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_39.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{base}}$</phrase></textobject></inlinemediaobject></inlineequation> for the underlying source of random numbers, i.e. <inlineequation><alt>$\displaystyle p_{\mathtt{base}}(i) = \frac{1}{r_{\mathtt{base}}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_42.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p_{\mathtt{base}}(i) = \frac{1}{r_{\mathtt{base}}}$</phrase></textobject></inlinemediaobject></inlineequation>. Let <inlineequation><alt>$p_{\mathtt{out\_s}}(i)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_43.png"/></imageobject><textobject role="tex"><phrase>$p_{\mathtt{out\_s}}(i)$</phrase></textobject></inlinemediaobject></inlineequation> denote the random distribution generated by <computeroutput><classname alt="boost::random::uniform_smallint">uniform_smallint</classname></computeroutput>. Then the sum over all i in <inlineequation><alt>$r_{\mathtt{out}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_40.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{out}}$</phrase></textobject></inlinemediaobject></inlineequation> of <inlineequation><alt>$\displaystyle \left(\frac{p_{\mathtt{out\_s}}(i)}{p_{\mathtt{out}}(i)} - 1\right)^2$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_44.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle \left(\frac{p_{\mathtt{out\_s}}(i)}{p_{\mathtt{out}}(i)} - 1\right)^2$</phrase></textobject></inlinemediaobject></inlineequation> shall not exceed <inlineequation><alt>$\displaystyle \frac{r_{\mathtt{out}}}{r_{\mathtt{base}}^2} (r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}}) (r_{\mathtt{out}} - r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}})$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_45.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle \frac{r_{\mathtt{out}}}{r_{\mathtt{base}}^2} (r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}}) (r_{\mathtt{out}} - r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}})$</phrase></textobject></inlinemediaobject></inlineequation>.</para><para>The template parameter IntType shall denote an integer-like value type.</para><para> <note><para> The property above is the square sum of the relative differences in probabilities between the desired uniform distribution <inlineequation><alt>$p_{\mathtt{out}}(i)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_46.png"/></imageobject><textobject role="tex"><phrase>$p_{\mathtt{out}}(i)$</phrase></textobject></inlinemediaobject></inlineequation> and the generated distribution <inlineequation><alt>$p_{\mathtt{out\_s}}(i)$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_43.png"/></imageobject><textobject role="tex"><phrase>$p_{\mathtt{out\_s}}(i)$</phrase></textobject></inlinemediaobject></inlineequation>. The property can be fulfilled with the calculation <inlineequation><alt>$(\mbox{base\_rng} \mbox{ mod } r_{\mathtt{out}})$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_47.png"/></imageobject><textobject role="tex"><phrase>$(\mbox{base\_rng} \mbox{ mod } r_{\mathtt{out}})$</phrase></textobject></inlinemediaobject></inlineequation>, as follows: Let <inlineequation><alt>$r = r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_48.png"/></imageobject><textobject role="tex"><phrase>$r = r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}}$</phrase></textobject></inlinemediaobject></inlineequation>. The base distribution on <inlineequation><alt>$r_{\mathtt{base}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_39.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{base}}$</phrase></textobject></inlinemediaobject></inlineequation> is folded onto the range <inlineequation><alt>$r_{\mathtt{out}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_40.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{out}}$</phrase></textobject></inlinemediaobject></inlineequation>. The numbers i &lt; r have assigned <inlineequation><alt>$\displaystyle \left\lfloor\frac{r_{\mathtt{base}}}{r_{\mathtt{out}}}\right\rfloor+1$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_49.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle \left\lfloor\frac{r_{\mathtt{base}}}{r_{\mathtt{out}}}\right\rfloor+1$</phrase></textobject></inlinemediaobject></inlineequation> numbers of the base distribution, the rest has only <inlineequation><alt>$\displaystyle \left\lfloor\frac{r_{\mathtt{base}}}{r_{\mathtt{out}}}\right\rfloor$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_50.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle \left\lfloor\frac{r_{\mathtt{base}}}{r_{\mathtt{out}}}\right\rfloor$</phrase></textobject></inlinemediaobject></inlineequation>. Therefore, <inlineequation><alt>$\displaystyle p_{\mathtt{out\_s}}(i) = \left(\left\lfloor\frac{r_{\mathtt{base}}} {r_{\mathtt{out}}}\right\rfloor+1\right) / r_{\mathtt{base}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_51.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p_{\mathtt{out\_s}}(i) = \left(\left\lfloor\frac{r_{\mathtt{base}}} {r_{\mathtt{out}}}\right\rfloor+1\right) / r_{\mathtt{base}}$</phrase></textobject></inlinemediaobject></inlineequation> for i &lt; r and <inlineequation><alt>$\displaystyle p_{\mathtt{out\_s}}(i) = \left\lfloor\frac{r_{\mathtt{base}}} {r_{\mathtt{out}}}\right\rfloor/r_{\mathtt{base}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_52.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p_{\mathtt{out\_s}}(i) = \left\lfloor\frac{r_{\mathtt{base}}} {r_{\mathtt{out}}}\right\rfloor/r_{\mathtt{base}}$</phrase></textobject></inlinemediaobject></inlineequation> otherwise. Substituting this in the above sum formula leads to the desired result. </para></note> </para><para>Note: The upper bound for <inlineequation><alt>$(r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}}) (r_{\mathtt{out}} - r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}})$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_53.png"/></imageobject><textobject role="tex"><phrase>$(r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}}) (r_{\mathtt{out}} - r_{\mathtt{base}} \mbox{ mod } r_{\mathtt{out}})$</phrase></textobject></inlinemediaobject></inlineequation> is <inlineequation><alt>$\displaystyle \frac{r_{\mathtt{out}}^2}{4}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_54.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle \frac{r_{\mathtt{out}}^2}{4}$</phrase></textobject></inlinemediaobject></inlineequation>. Regarding the upper bound for the square sum of the relative quantization error of <inlineequation><alt>$\displaystyle \frac{r_\mathtt{out}^3}{4r_{\mathtt{base}}^2}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_55.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle \frac{r_\mathtt{out}^3}{4r_{\mathtt{base}}^2}$</phrase></textobject></inlinemediaobject></inlineequation>, it seems wise to either choose <inlineequation><alt>$r_{\mathtt{base}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_39.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{base}}$</phrase></textobject></inlinemediaobject></inlineequation> so that <inlineequation><alt>$r_{\mathtt{base}} &gt; 10r_{\mathtt{out}}^2$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_56.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{base}} &gt; 10r_{\mathtt{out}}^2$</phrase></textobject></inlinemediaobject></inlineequation> or ensure that <inlineequation><alt>$r_{\mathtt{base}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_39.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{base}}$</phrase></textobject></inlinemediaobject></inlineequation> is divisible by <inlineequation><alt>$r_{\mathtt{out}}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_40.png"/></imageobject><textobject role="tex"><phrase>$r_{\mathtt{out}}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>uniform_smallint</classname></type></typedef>
  2750. <method-group name="public member functions">
  2751. <method name="a" cv="const"><type>IntType</type><description><para>Returns the minimum value. </para></description></method>
  2752. <method name="b" cv="const"><type>IntType</type><description><para>Returns the maximum value. </para></description></method>
  2753. </method-group>
  2754. <constructor><parameter name="min"><paramtype>IntType</paramtype><default>0</default></parameter><parameter name="max"><paramtype>IntType</paramtype><default>9</default></parameter><description><para>constructs the parameters of a <computeroutput><classname alt="boost::random::uniform_smallint">uniform_smallint</classname></computeroutput> distribution. </para></description></constructor>
  2755. <method-group name="friend functions">
  2756. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2757. <template-type-parameter name="CharT"/>
  2758. <template-type-parameter name="Traits"/>
  2759. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes the parameters to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2760. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2761. <template-type-parameter name="CharT"/>
  2762. <template-type-parameter name="Traits"/>
  2763. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads the parameters from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2764. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are equal. </para></description></method>
  2765. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are different. </para></description></method>
  2766. </method-group>
  2767. </class><typedef name="input_type"><type>IntType</type></typedef>
  2768. <typedef name="result_type"><type>IntType</type></typedef>
  2769. <method-group name="public member functions">
  2770. <method name="a" cv="const"><type>result_type</type><description><para>Returns the minimum value of the distribution. </para></description></method>
  2771. <method name="b" cv="const"><type>result_type</type><description><para>Returns the maximum value of the distribution. </para></description></method>
  2772. <method name="min" cv="const"><type>result_type</type><description><para>Returns the minimum value of the distribution. </para></description></method>
  2773. <method name="max" cv="const"><type>result_type</type><description><para>Returns the maximum value of the distribution. </para></description></method>
  2774. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2775. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  2776. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2777. <method name="operator()" cv="const"><type>result_type</type><template>
  2778. <template-type-parameter name="Engine"/>
  2779. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><description><para>Returns a value uniformly distributed in the range [min(), max()]. </para></description></method>
  2780. <method name="operator()" cv="const"><type>result_type</type><template>
  2781. <template-type-parameter name="Engine"/>
  2782. </template><parameter name="eng"><paramtype>Engine &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a value uniformly distributed in the range [param.a(), param.b()]. </para></description></method>
  2783. </method-group>
  2784. <constructor specifiers="explicit"><parameter name="min"><paramtype>IntType</paramtype><default>0</default></parameter><parameter name="max"><paramtype>IntType</paramtype><default>9</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::uniform_smallint">uniform_smallint</classname></computeroutput>. <computeroutput>min</computeroutput> and <computeroutput>max</computeroutput> are the lower and upper bounds of the output range, respectively. </para></description></constructor>
  2785. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::uniform_smallint">uniform_smallint</classname></computeroutput> from its parameters. </para></description></constructor>
  2786. <method-group name="friend functions">
  2787. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2788. <template-type-parameter name="CharT"/>
  2789. <template-type-parameter name="Traits"/>
  2790. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ud"><paramtype>const <classname>uniform_smallint</classname> &amp;</paramtype></parameter><description><para>Writes the distribution to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2791. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2792. <template-type-parameter name="CharT"/>
  2793. <template-type-parameter name="Traits"/>
  2794. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="ud"><paramtype>const <classname>uniform_smallint</classname> &amp;</paramtype></parameter><description><para>Reads the distribution from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2795. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_smallint</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_smallint</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions will produce identical sequences of values given equal generators. </para></description></method>
  2796. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>uniform_smallint</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>uniform_smallint</classname> &amp;</paramtype></parameter><description><para>Returns true if the two distributions may produce different sequences of values given equal generators. </para></description></method>
  2797. </method-group>
  2798. </class>
  2799. </namespace>
  2800. </namespace>
  2801. </header>
  2802. <header name="boost/random/variate_generator.hpp">
  2803. <namespace name="boost">
  2804. <class name="variate_generator"><template>
  2805. <template-type-parameter name="Engine"/>
  2806. <template-type-parameter name="Distribution"/>
  2807. </template><description><para>A random variate generator is used to join a random number generator together with a random number distribution. Boost.Random provides a vast choice of <link linkend="boost_random.reference.generators">generators</link> as well as <link linkend="boost_random.reference.distributions">distributions</link> .</para><para>The argument for the template parameter Engine shall be of the form U, U&amp;, or U*, where U models a <link linkend="boost_random.reference.concepts.uniform_random_number_generator">uniform random number generator</link> . Then, the member engine_value_type names U (not the pointer or reference to U).</para><para>Specializations of <computeroutput><classname alt="boost::variate_generator">variate_generator</classname></computeroutput> satisfy the requirements of CopyConstructible. They also satisfy the requirements of Assignable unless the template parameter Engine is of the form U&amp;.</para><para>The complexity of all functions specified in this section is constant. No function described in this section except the constructor throws an exception. </para></description><typedef name="engine_value_type"><type>helper_type::value_type</type></typedef>
  2808. <typedef name="engine_type"><type>Engine</type></typedef>
  2809. <typedef name="distribution_type"><type>Distribution</type></typedef>
  2810. <typedef name="result_type"><type>Distribution::result_type</type></typedef>
  2811. <method-group name="public member functions">
  2812. <method name="operator()"><type>result_type</type><description><para>Returns: distribution()(engine()) </para></description></method>
  2813. <method name="operator()"><type>result_type</type><template>
  2814. <template-type-parameter name="T"/>
  2815. </template><parameter name="value"><paramtype>const T &amp;</paramtype></parameter><description><para>Returns: distribution()(engine(), value). </para></description></method>
  2816. <method name="engine"><type>engine_value_type &amp;</type><description><para>Returns: A reference to the associated uniform random number generator. </para></description></method>
  2817. <method name="engine" cv="const"><type>const engine_value_type &amp;</type><description><para>Returns: A reference to the associated uniform random number generator. </para></description></method>
  2818. <method name="distribution"><type>distribution_type &amp;</type><description><para>Returns: A reference to the associated <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> . </para></description></method>
  2819. <method name="distribution" cv="const"><type>const distribution_type &amp;</type><description><para>Returns: A reference to the associated random distribution. </para></description></method>
  2820. <method name="min" cv="const"><type>result_type</type><description><para>Precondition: distribution().min() is well-formed</para><para>Returns: distribution().min() </para></description></method>
  2821. <method name="max" cv="const"><type>result_type</type><description><para>Precondition: distribution().max() is well-formed</para><para>Returns: distribution().max() </para></description></method>
  2822. </method-group>
  2823. <constructor><parameter name="e"><paramtype>Engine</paramtype></parameter><parameter name="d"><paramtype>Distribution</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::variate_generator">variate_generator</classname></computeroutput> object with the associated <link linkend="boost_random.reference.concepts.uniform_random_number_generator">uniform random number generator</link> eng and the associated <link linkend="boost_random.reference.concepts.random_distribution">random distribution</link> d.</para><para>Throws: If and what the copy constructor of Engine or Distribution throws. </para></description></constructor>
  2824. </class></namespace>
  2825. </header>
  2826. <header name="boost/random/weibull_distribution.hpp">
  2827. <namespace name="boost">
  2828. <namespace name="random">
  2829. <class name="weibull_distribution"><template>
  2830. <template-type-parameter name="RealType"><default>double</default></template-type-parameter>
  2831. </template><description><para>The Weibull distribution is a real valued distribution with two parameters a and b, producing values &gt;= 0.</para><para>It has <inlineequation><alt>$\displaystyle p(x) = \frac{a}{b}\left(\frac{x}{b}\right)^{a-1}e^{-\left(\frac{x}{b}\right)^a}$</alt><inlinemediaobject><imageobject role="html"><imagedata format="PNG" fileref="images/random//form_57.png"/></imageobject><textobject role="tex"><phrase>$\displaystyle p(x) = \frac{a}{b}\left(\frac{x}{b}\right)^{a-1}e^{-\left(\frac{x}{b}\right)^a}$</phrase></textobject></inlinemediaobject></inlineequation>. </para></description><class name="param_type"><typedef name="distribution_type"><type><classname>weibull_distribution</classname></type></typedef>
  2832. <method-group name="public member functions">
  2833. <method name="a" cv="const"><type>RealType</type><description><para>Returns the "a" parameter of the distribtuion. </para></description></method>
  2834. <method name="b" cv="const"><type>RealType</type><description><para>Returns the "b" parameter of the distribution. </para></description></method>
  2835. </method-group>
  2836. <constructor specifiers="explicit"><parameter name="a"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="b"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::weibull_distribution::param_type">param_type</classname></computeroutput> from the "a" and "b" parameters of the distribution.</para><para>Requires: a &gt; 0 &amp;&amp; b &gt; 0 </para></description></constructor>
  2837. <method-group name="friend functions">
  2838. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2839. <template-type-parameter name="CharT"/>
  2840. <template-type-parameter name="Traits"/>
  2841. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::weibull_distribution::param_type">param_type</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2842. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2843. <template-type-parameter name="CharT"/>
  2844. <template-type-parameter name="Traits"/>
  2845. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::weibull_distribution::param_type">param_type</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2846. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the same. </para></description></method>
  2847. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns true if the two sets of parameters are the different. </para></description></method>
  2848. </method-group>
  2849. </class><typedef name="result_type"><type>RealType</type></typedef>
  2850. <typedef name="input_type"><type>RealType</type></typedef>
  2851. <method-group name="public member functions">
  2852. <method name="operator()" cv="const"><type>RealType</type><template>
  2853. <template-type-parameter name="URNG"/>
  2854. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><description><para>Returns a random variate distributed according to the <computeroutput><classname alt="boost::random::weibull_distribution">weibull_distribution</classname></computeroutput>. </para></description></method>
  2855. <method name="operator()" cv="const"><type>RealType</type><template>
  2856. <template-type-parameter name="URNG"/>
  2857. </template><parameter name="urng"><paramtype>URNG &amp;</paramtype></parameter><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Returns a random variate distributed accordint to the Weibull distribution with parameters specified by <computeroutput>param</computeroutput>. </para></description></method>
  2858. <method name="a" cv="const"><type>RealType</type><description><para>Returns the "a" parameter of the distribution. </para></description></method>
  2859. <method name="b" cv="const"><type>RealType</type><description><para>Returns the "b" parameter of the distribution. </para></description></method>
  2860. <method name="min" cv="const"><type>RealType</type><description><para>Returns the smallest value that the distribution can produce. </para></description></method>
  2861. <method name="max" cv="const"><type>RealType</type><description><para>Returns the largest value that the distribution can produce. </para></description></method>
  2862. <method name="param" cv="const"><type><classname>param_type</classname></type><description><para>Returns the parameters of the distribution. </para></description></method>
  2863. <method name="param"><type>void</type><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Sets the parameters of the distribution. </para></description></method>
  2864. <method name="reset"><type>void</type><description><para>Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. </para></description></method>
  2865. </method-group>
  2866. <constructor specifiers="explicit"><parameter name="a"><paramtype>RealType</paramtype><default>1.0</default></parameter><parameter name="b"><paramtype>RealType</paramtype><default>1.0</default></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::weibull_distribution">weibull_distribution</classname></computeroutput> from its "a" and "b" parameters.</para><para>Requires: a &gt; 0 &amp;&amp; b &gt; 0 </para></description></constructor>
  2867. <constructor specifiers="explicit"><parameter name="param"><paramtype>const <classname>param_type</classname> &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::weibull_distribution">weibull_distribution</classname></computeroutput> from its parameters. </para></description></constructor>
  2868. <method-group name="friend functions">
  2869. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2870. <template-type-parameter name="CharT"/>
  2871. <template-type-parameter name="Traits"/>
  2872. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>weibull_distribution</classname> &amp;</paramtype></parameter><description><para>Writes a <computeroutput><classname alt="boost::random::weibull_distribution">weibull_distribution</classname></computeroutput> to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2873. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2874. <template-type-parameter name="CharT"/>
  2875. <template-type-parameter name="Traits"/>
  2876. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="wd"><paramtype>const <classname>weibull_distribution</classname> &amp;</paramtype></parameter><description><para>Reads a <computeroutput><classname alt="boost::random::weibull_distribution">weibull_distribution</classname></computeroutput> from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2877. <method name="operator=="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>weibull_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>weibull_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::weibull_distribution">weibull_distribution</classname></computeroutput> will return identical sequences of values given equal generators. </para></description></method>
  2878. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>weibull_distribution</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>weibull_distribution</classname> &amp;</paramtype></parameter><description><para>Returns true if the two instances of <computeroutput><classname alt="boost::random::weibull_distribution">weibull_distribution</classname></computeroutput> will return different sequences of values given equal generators. </para></description></method>
  2879. </method-group>
  2880. </class>
  2881. </namespace>
  2882. </namespace>
  2883. </header>
  2884. <header name="boost/random/xor_combine.hpp">
  2885. <namespace name="boost">
  2886. <namespace name="random">
  2887. <class name="xor_combine_engine"><template>
  2888. <template-type-parameter name="URNG1"/>
  2889. <template-nontype-parameter name="s1"><type>int</type></template-nontype-parameter>
  2890. <template-type-parameter name="URNG2"/>
  2891. <template-nontype-parameter name="s2"><type>int</type></template-nontype-parameter>
  2892. </template><description><para>Instantiations of <computeroutput><classname alt="boost::random::xor_combine_engine">xor_combine_engine</classname></computeroutput> model a <link linkend="boost_random.reference.concepts.pseudo_random_number_generator">pseudo-random number generator</link> . To produce its output it invokes each of the base generators, shifts their results and xors them together. </para></description><typedef name="base1_type"><type>URNG1</type></typedef>
  2893. <typedef name="base2_type"><type>URNG2</type></typedef>
  2894. <typedef name="result_type"><type>base1_type::result_type</type></typedef>
  2895. <data-member name="has_fixed_range" specifiers="static"><type>const bool</type></data-member>
  2896. <data-member name="shift1" specifiers="static"><type>const int</type></data-member>
  2897. <data-member name="shift2" specifiers="static"><type>const int</type></data-member>
  2898. <method-group name="public member functions">
  2899. <method name="seed"><type>void</type><description><para>Calls <computeroutput>seed()</computeroutput> for both base generators. </para></description></method>
  2900. <method name="seed"><type>void</type><parameter name="v"><paramtype>result_type</paramtype></parameter><description><para><computeroutput>seeds</computeroutput> both base generators with <computeroutput>v</computeroutput>. </para></description></method>
  2901. <method name="seed"><type>void</type><template>
  2902. <template-type-parameter name="SeedSeq"/>
  2903. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para><computeroutput>seeds</computeroutput> both base generators with values produced by <computeroutput>seq</computeroutput>. </para></description></method>
  2904. <method name="seed"><type>void</type><template>
  2905. <template-type-parameter name="It"/>
  2906. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>seeds both base generators with values from the iterator range [first, last) and changes first to point to the element after the last one used. If there are not enough elements in the range to seed both generators, throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></method>
  2907. <method name="base1" cv="const"><type>const base1_type &amp;</type><description><para>Returns the first base generator. </para></description></method>
  2908. <method name="base2" cv="const"><type>const base2_type &amp;</type><description><para>Returns the second base generator. </para></description></method>
  2909. <method name="operator()"><type>result_type</type><description><para>Returns the next value of the generator. </para></description></method>
  2910. <method name="generate"><type>void</type><template>
  2911. <template-type-parameter name="Iter"/>
  2912. </template><parameter name="first"><paramtype>Iter</paramtype></parameter><parameter name="last"><paramtype>Iter</paramtype></parameter><description><para>Fills a range with random values </para></description></method>
  2913. <method name="discard"><type>void</type><parameter name="z"><paramtype>boost::uintmax_t</paramtype></parameter><description><para>Advances the state of the generator by <computeroutput>z</computeroutput>. </para></description></method>
  2914. </method-group>
  2915. <constructor><description><para>Constructors a <computeroutput><classname alt="boost::random::xor_combine_engine">xor_combine_engine</classname></computeroutput> by default constructing both base generators. </para></description></constructor>
  2916. <constructor><parameter name="rng1"><paramtype>const base1_type &amp;</paramtype></parameter><parameter name="rng2"><paramtype>const base2_type &amp;</paramtype></parameter><description><para>Constructs a <computeroutput>xor_combine</computeroutput> by copying two base generators. </para></description></constructor>
  2917. <constructor specifiers="explicit"><parameter name="v"><paramtype>result_type</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::xor_combine_engine">xor_combine_engine</classname></computeroutput>, seeding both base generators with <computeroutput>v</computeroutput>.</para><para> <warning><para> The exact algorithm used by this function may change in the future. </para></warning> </para></description></constructor>
  2918. <constructor specifiers="explicit"><template>
  2919. <template-type-parameter name="SeedSeq"/>
  2920. </template><parameter name="seq"><paramtype>SeedSeq &amp;</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::xor_combine_engine">xor_combine_engine</classname></computeroutput>, seeding both base generators with values produced by <computeroutput>seq</computeroutput>. </para></description></constructor>
  2921. <constructor><template>
  2922. <template-type-parameter name="It"/>
  2923. </template><parameter name="first"><paramtype>It &amp;</paramtype></parameter><parameter name="last"><paramtype>It</paramtype></parameter><description><para>Constructs a <computeroutput><classname alt="boost::random::xor_combine_engine">xor_combine_engine</classname></computeroutput>, seeding both base generators with values from the iterator range [first, last) and changes first to point to the element after the last one used. If there are not enough elements in the range to seed both generators, throws <computeroutput>std::invalid_argument</computeroutput>. </para></description></constructor>
  2924. <method-group name="public static functions">
  2925. <method name="min" specifiers="static"><type>result_type</type><description><para>Returns the smallest value that the generator can produce. </para></description></method>
  2926. <method name="max" specifiers="static"><type>result_type</type><description><para>Returns the largest value that the generator can produce. </para></description></method>
  2927. </method-group>
  2928. <method-group name="friend functions">
  2929. <method name="operator&lt;&lt;"><type>friend std::basic_ostream&lt; CharT, Traits &gt; &amp;</type><template>
  2930. <template-type-parameter name="CharT"/>
  2931. <template-type-parameter name="Traits"/>
  2932. </template><parameter name="os"><paramtype>std::basic_ostream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>xor_combine_engine</classname> &amp;</paramtype></parameter><description><para>Writes the textual representation of the generator to a <computeroutput>std::ostream</computeroutput>. </para></description></method>
  2933. <method name="operator&gt;&gt;"><type>friend std::basic_istream&lt; CharT, Traits &gt; &amp;</type><template>
  2934. <template-type-parameter name="CharT"/>
  2935. <template-type-parameter name="Traits"/>
  2936. </template><parameter name="is"><paramtype>std::basic_istream&lt; CharT, Traits &gt; &amp;</paramtype></parameter><parameter name="s"><paramtype>const <classname>xor_combine_engine</classname> &amp;</paramtype></parameter><description><para>Reads the textual representation of the generator from a <computeroutput>std::istream</computeroutput>. </para></description></method>
  2937. <method name="operator=="><type>friend bool</type><parameter name="x"><paramtype>const <classname>xor_combine_engine</classname> &amp;</paramtype></parameter><parameter name="y"><paramtype>const <classname>xor_combine_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce identical sequences. </para></description></method>
  2938. <method name="operator!="><type>friend bool</type><parameter name="lhs"><paramtype>const <classname>xor_combine_engine</classname> &amp;</paramtype></parameter><parameter name="rhs"><paramtype>const <classname>xor_combine_engine</classname> &amp;</paramtype></parameter><description><para>Returns true if the two generators will produce different sequences. </para></description></method>
  2939. </method-group>
  2940. </class>
  2941. </namespace>
  2942. </namespace>
  2943. </header>
  2944. </library-reference>