using System;

namespace EvoBoat.EvoAlg
{
    /// <summary>
    /// Cauchy random number generator
    /// </summary>
    public class CauchyRandom : Random
    {
        double alpha = 0, beta = 1;
        
        /// <summary>
        /// 生成标准柯西随机数
        /// </summary>
        public override double NextDouble()
        {
            return alpha + beta * Math.Tan(Math.PI * (base.NextDouble() - 0.5));
        }
    }
}
