Esempio n. 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);
        }
Esempio n. 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()));
 }