Module Expr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr BinOpMult ListLoad Num Num Assign AttributeStore NameLoad attr Num Assign SubscriptStore AttributeLoad NameLoad attr Index Num Call NameLoad BinOpBitAnd NameLoad Num For NameStore Call NameLoad Num Num body Assign NameStore BinOpRShift SubscriptLoad AttributeLoad NameLoad attr Index BinOpSub NameLoad Num Num Assign NameStore BinOpBitXor SubscriptLoad AttributeLoad NameLoad attr Index BinOpSub NameLoad Num NameLoad Assign NameStore BinOpMult Num NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad BinOpBitAnd NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call NameLoad Num Num body Assign NameStore BinOpAdd BinOpBitAnd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num BinOpBitAnd SubscriptLoad AttributeLoad NameLoad attr Index BinOpMod BinOpAdd NameLoad Num Num Num Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad BinOpBitXor SubscriptLoad AttributeLoad NameLoad attr Index BinOpMod BinOpAdd NameLoad Num Num BinOpRShift NameLoad Num If CompareNotEq BinOpMod NameLoad Num Num body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad BinOpBitXor SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Assign NameStore BinOpBitXor NameLoad BinOpRShift NameLoad Num Assign NameStore BinOpBitXor NameLoad BinOpBitAnd BinOpLShift NameLoad Num Num Assign NameStore BinOpBitXor NameLoad BinOpBitAnd BinOpLShift NameLoad Num Num Assign NameStore BinOpBitXor NameLoad BinOpRShift NameLoad Num Assign AttributeStore NameLoad attr BinOpMod BinOpAdd AttributeLoad NameLoad attr Num Num Return NameLoad decorator_list decorator_list Expr Str
N/A N/A 
An implementation of MT19937 Mersenne Twister Random number generator.


Based on Wikipedia PseudoCode as suggested by the challenge.

mtwister will end up being an object (PRNG) with its own state.
-Patrick Biernat
 mtwister N/A object N/A __init__ N/A N/A self seed N/A N/A N/A 
		Sets up some values and performs initialization from a seed.
		MT array init Code split up for readability, most implementations throw everything
		into one line. 
		 N/A N/A self MT N/A N/A 0 624 N/A N/A self index 0 N/A N/A N/A self MT N/A 0 N/A int N/A seed 4294967295 N/A i N/A range 1 624 N/A N/A cnst N/A N/A N/A self MT N/A N/A i 1 30 N/A cnst1 N/A N/A N/A self MT N/A N/A i 1 cnst N/A cnst1 N/A 1812433253 cnst1 N/A cnst1 N/A cnst1 i N/A N/A N/A self MT N/A i N/A cnst1 4294967295 N/A generate_numbers N/A N/A self N/A N/A N/A 
		Generate an array of 624 untempered(?) numbers
		 N/A i N/A range 0 624 N/A N/A y N/A N/A N/A N/A self MT N/A i 2147483648 N/A N/A N/A self MT N/A N/A N/A i 1 624 2147483647 N/A N/A N/A self MT N/A i N/A N/A N/A self MT N/A N/A N/A i 397 624 N/A y 1 N/A N/A N/A y 2 0 N/A N/A N/A N/A self MT N/A i N/A N/A N/A self MT N/A i 2567483615 N/A extract_number N/A N/A self N/A N/A N/A 
		Extract a "tempered" number based on index-th value,
		calling generate_numbers every 624 vals.
		 N/A N/A N/A self index 0 N/A N/A N/A N/A self generate_numbers N/A y N/A N/A self MT N/A N/A self index N/A y N/A y N/A y 11 N/A y N/A y N/A N/A y 7 2636928640 N/A y N/A y N/A N/A y 15 4022730752 N/A y N/A y N/A y 18 N/A N/A self index N/A N/A N/A self index 1 624 N/A y N/A N/A N/A 
Test with Two instances

mt = mtwister(0)
print mt.extract_number()
print mt.extract_number()
print mt.extract_number()

yt = mtwister(0)
print yt.extract_number()
print yt.extract_number()
print yt.extract_number()


