private final void setSeed ( int seed ) { // Annoying runtime check for initialisation of internal data // caused by java.util.Random invoking setSeed() during init. // This is unavoidable because no fields in our instance will // have been initialised at this point, not even if the code // were placed at the declaration of the member variable. if ( mt == null ) mt = new int [ N ] ; // ---- Begin Mersenne Twister Algorithm ---- mt [ 0 ] = seed ; for ( mti = 1 ; mti < N ; mti ++ ) { mt [ mti ] = ( MAGIC_FACTOR1 * ( mt [ mti - 1 ] ^ ( mt [ mti - 1 ] >>> 30 ) ) + mti ) ; } // ---- End Mersenne Twister Algorithm ---- }
not be made public .