/// <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); }
/// <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); }