Ejemplo n.º 1
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = Parameters?.GetArrayHash() ?? 0;
         hashCode = (hashCode * 397) ^ NumOutcomes;
         hashCode = (hashCode * 397) ^ CorrectionConstant.GetHashCode();
         hashCode = (hashCode * 397) ^ CorrectionParam.GetHashCode();
         hashCode = (hashCode * 397) ^ ConstantInverse.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <returns>
 /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
 /// </returns>
 /// <param name="other">An object to compare with this object.</param>
 public bool Equals(EvalParameters other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(Parameters, other.Parameters) &&
            NumOutcomes == other.NumOutcomes &&
            CorrectionConstant.Equals(other.CorrectionConstant) &&
            CorrectionParam.Equals(other.CorrectionParam) &&
            ConstantInverse.Equals(other.ConstantInverse));
 }