public virtual void SetData(MersenneTwisterData rhs)
        {
            // copy
            ByteBuffer src = rhs.state.Duplicate();

            src.Position(0);
            src.Limit(MT_N);
            ByteBuffer buff = ByteBuffer.AllocateDirect(MT_N * 8);

            buff.Order(ByteBuffer.NativeOrder());
            state = buff.AsLongBuffer();
            state.Clear();
            state.Put(src);
            next = rhs.next;
            left = rhs.left;
        }
 public MersenneTwister(MersenneTwisterData data) : base()
 {
     SetData(data);
 }