• λ我爱Aspx >> Asp.Net >> A Good 31 bit Random Number Generator Class
  • A Good 31 bit Random Number Generator Class

  • :aspxer  Դ:internet  :2007-5-31 2:20:30  ؼ:
  • /// "I am Pentium of Borg,

    /// Division is Futile,

    /// You will be approximated!"

    /// </borg-joke>

    /// </remarks>

    public class RNDuint

    {

    protected uint seed;

    #if(ACM_ORIGINAL_NUMBERS)

    ///<remarks> This version uses the original ACM m and q.

    ///</remarks>

    static protected uint m = 2147483647;

    static protected uint q = 127773;

    static protected ushort a = 16807;

    static protected ushort r = 2836;

    static protected uint successfulltest = 1043618065;

    #else

    ///<remarks>

    /// 1992 -- This version contains NEW numbers provided by John Burton

    /// that improve the distribution over the originally published

    /// numbers in the ACM. JAE jill@eskimo.com

    /// </remarks>

    /// <summary>modulus 2**31 -1</summary>

    Ҷƪл˵?
  • һƪ一棵C#写的树(1) he_x(原作)
    һƪ浅谈图像压缩算法(好文章。看看吧。再别说不了解JPG的原理了)