示例#1
0
 public static bool FindDuplicates <T>(this Multiarray <T> list)
 {
     for (int i = 0; i < list.Array.Length; i++)
     {
         for (int j = 0; j < i; j++)
         {
             if (list[i].Equals(list[j]))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
示例#2
0
        public static bool FindDuplicates <T>(this Multiarray <T> list, out List <Twoint> twoint)
        {
            List <Twoint> ti  = new List <Twoint>();
            bool          dup = false;

            for (int i = 0; i < list.Array.Length; i++)
            {
                for (int j = 0; j < i; j++)
                {
                    if (list[i].Equals(list[j]))
                    {
                        ti.Add(new Twoint(i, j));
                        dup = true;
                    }
                }
            }
            twoint = ti;
            return(dup);
        }
示例#3
0
        public static List <T> To1DList <T>(this Multiarray <T> arr)
        {
            List <T> list = arr.Array.Cast <T>().ToList();

            return(list);
        }