JezK
Edit File: cdesc-XorShiftRandom.ri
U:RDoc::NormalModule[iI"XorShiftRandom:EFI"1Concurrent::ThreadSafe::Util::XorShiftRandom;F0o:RDoc::Markup::Document:@parts[o;;[ o:RDoc::Markup::Paragraph;[I"GA xorshift random number (positive +Fixnum+s) generator, provides ;TI"Jreasonably cheap way to generate thread local random numbers without ;TI"-contending for the global +Kernel.rand+.;To:RDoc::Markup::BlankLine o; ;[I"Usage:;To:RDoc::Markup::Verbatim;[I"Kx = XorShiftRandom.get # uses Kernel.rand to generate an initial seed ;TI"while true ;TI"[ if (x = XorShiftRandom.xorshift).odd? # thread-localy generate a next random number ;TI" do_something_at_random ;TI" end ;TI"end;T:@format0: @fileI"8lib/concurrent/thread_safe/util/xor_shift_random.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [U:RDoc::Constant[i I"MAX_XOR_SHIFTABLE_INT;FI"HConcurrent::ThreadSafe::Util::XorShiftRandom::MAX_XOR_SHIFTABLE_INT;F00o;;[ ; @;0@@cRDoc::NormalModule0[ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[;[[I"get;FI"8lib/concurrent/thread_safe/util/xor_shift_random.rb;T[I" xorshift;F@:[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@I"!Concurrent::ThreadSafe::Util;F@'