Ejemplo n.º 1
0
        /// <summary>
        /// Determines whether the specified <see cref="ChannelStatistics"/> is equal to the current <see cref="ChannelStatistics"/>.
        /// </summary>
        /// <param name="other">The channel statistics to compare this <see cref="ChannelStatistics"/> with.</param>
        /// <returns>True when the specified <see cref="ChannelStatistics"/> is equal to the current <see cref="ChannelStatistics"/>.</returns>
        public bool Equals(ChannelStatistics other)
        {
            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                (Depth.Equals(other.Depth) &&
                 Entropy.Equals(other.Entropy) &&
                 Kurtosis.Equals(other.Kurtosis) &&
                 Maximum.Equals(other.Maximum) &&
                 Mean.Equals(other.Mean) &&
                 Minimum.Equals(other.Minimum) &&
                 Skewness.Equals(other.Skewness) &&
                 StandardDeviation.Equals(other.StandardDeviation) &&
                 Sum.Equals(other.Sum) &&
                 SumCubed.Equals(other.SumCubed) &&
                 SumFourthPower.Equals(other.SumFourthPower) &&
                 SumSquared.Equals(other.SumSquared) &&
                 Variance.Equals(other.Variance));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Serves as a hash of this type.
 /// </summary>
 /// <returns>A hash code for the current instance.</returns>
 public override int GetHashCode()
 {
     return
         (Depth.GetHashCode() ^
          Entropy.GetHashCode() ^
          Kurtosis.GetHashCode() ^
          Maximum.GetHashCode() ^
          Mean.GetHashCode() ^
          Minimum.GetHashCode() ^
          Skewness.GetHashCode() ^
          StandardDeviation.GetHashCode() ^
          Sum.GetHashCode() ^
          SumCubed.GetHashCode() ^
          SumFourthPower.GetHashCode() ^
          SumSquared.GetHashCode() ^
          Variance.GetHashCode());
 }