예제 #1
0
 public override int GetHashCode()
 {
     return(C.GetHashCode() +
            CacheSize.GetHashCode() +
            Coefficient0.GetHashCode() +
            Degree.GetHashCode() +
            EPS.GetHashCode() +
            Gamma.GetHashCode() +
            KernelType.GetHashCode() +
            Nu.GetHashCode() +
            P.GetHashCode() +
            Probability.GetHashCode() +
            Shrinking.GetHashCode() +
            SvmType.GetHashCode() +
            Weights.ToArray().ComputeHashcode());
 }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (VersionId != null)
         {
             hashCode = hashCode * 59 + VersionId.GetHashCode();
         }
         if (CacheOn != null)
         {
             hashCode = hashCode * 59 + CacheOn.GetHashCode();
         }
         if (ConcurrencyLevel != null)
         {
             hashCode = hashCode * 59 + ConcurrencyLevel.GetHashCode();
         }
         if (CacheStartSize != null)
         {
             hashCode = hashCode * 59 + CacheStartSize.GetHashCode();
         }
         if (CacheTtl != null)
         {
             hashCode = hashCode * 59 + CacheTtl.GetHashCode();
         }
         if (CacheSize != null)
         {
             hashCode = hashCode * 59 + CacheSize.GetHashCode();
         }
         if (TimeLimit != null)
         {
             hashCode = hashCode * 59 + TimeLimit.GetHashCode();
         }
         return(hashCode);
     }
 }