Exemple #1
0
 private void SetSocialGroupsLast()
 {
     SocialGroup ins;
     InteractionLog[] intarr = this.InteractionsLast.ToArray();
     for (int i = 0; i < intarr.Length; i++)
     {
         //...Get Top 5 Highest Average Times
         ins = new SocialGroup();
         ins.AnimalId = intarr[i].AnimalId;
         ins.AnimalsInGroup = intarr[i].Interactions.Select(x => x.AnimalId).ToList();
         this.SocialGroupsLast.Add(ins);
     }
 }
Exemple #2
0
        private bool CompareSocialGroups(SocialGroup SocialGroupA, SocialGroup SocialGroupB)
        {
            SocialGroupA.AnimalsInGroup.Sort();
            SocialGroupB.AnimalsInGroup.Sort();

            return SocialGroupA.AnimalsInGroup.SequenceEqual(SocialGroupB.AnimalsInGroup);
        }