Facility for "restoring" the NTL PRG state. More...
#include <NumbTh.h>
Public Member Functions | |
void | restore () |
Restore the PRG state of NTL. | |
Facility for "restoring" the NTL PRG state.
NTL's random number generation faciliity is pretty limited, and does not provide a way to save/restore the state of a pseudo-random stream. This class gives us that ability: Constructing a RandomState object uses the PRG to generate 512 bits and stores them. Upon destruction (or an explicit call to restore()), these bits are used to re-set the seed of the PRG. A typical usage of thie class is as follows: