Exemple #1
0
        protected static int[] GetHashCodes(SocialArrayParameter parameters)
        {
            var hashCodes = new int[parameters.NumAgents];

            for (var i = 0u; i < parameters.NumAgents; i++)
            {
                hashCodes[i] = parameters[i].GetHashCode();
            }
            Array.Sort(hashCodes);
            return(hashCodes);
        }
Exemple #2
0
 public bool Equals(SocialArrayParameter other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(this.NumAgents == other.NumAgents && this.GetHashCode().Equals(other.GetHashCode()));
 }