Esempio n. 1
0
        /// <summary>
        /// Raises a distribution to a power.
        /// </summary>
        /// <param name="dist">The distribution.</param>
        /// <param name="exponent">The power to raise to.</param>
        /// <returns><paramref name="dist"/> raised to power <paramref name="exponent"/>.</returns>
        public static Discrete operator ^(Discrete dist, double exponent)
        {
            Discrete result = new Discrete(dist.Dimension);

            result.SetToPower(dist, exponent);
            return(result);
        }
Esempio n. 2
0
 /// <summary>
 /// Sets the parameters to represent the power of a discrete distributions.
 /// </summary>
 /// <param name="value">The discrete distribution</param>
 /// <param name="exponent">The exponent</param>
 public void SetToPower(TThis value, double exponent)
 {
     disc.SetToPower(value.disc, exponent);
 }