public int[][] Group(IROMatrix <double> Y)
        {
            var groups = new System.Collections.ArrayList[2];

            for (int i = 0; i < 2; i++)
            {
                groups[i] = new System.Collections.ArrayList();
            }

            int[][] similarGroups = new ExcludeGroupsGroupingStrategy().Group(Y);

            int destinationGroupNumber = 0;

            for (int g = 0; g < similarGroups.Length; g++)
            {
                for (int i = 0; i < similarGroups[g].Length; i++)
                {
                    groups[destinationGroupNumber % 2].Add(similarGroups[g][i]);
                    destinationGroupNumber++;
                }
            }

            int[][] result = new int[2][];
            for (int i = 0; i < result.Length; i++)
            {
                result[i] = (int[])groups[i].ToArray(typeof(int));
            }
            return(result);
        }
    public int[][] Group(IROMatrix Y)
    {
      System.Collections.ArrayList[] groups = new System.Collections.ArrayList[2];
      for(int i=0;i<2;i++)
        groups[i] = new System.Collections.ArrayList();

      int[][] similarGroups = new ExcludeGroupsGroupingStrategy().Group(Y);

      int destinationGroupNumber=0;
      for(int g=0;g<similarGroups.Length;g++)
      {
        for(int i=0;i<similarGroups[g].Length;i++)
        {
          groups[destinationGroupNumber%2].Add(similarGroups[g][i]);
          destinationGroupNumber++;
        }
      }

      int[][] result = new int[2][];
      for(int i=0;i<result.Length;i++)
        result[i] = (int[])groups[i].ToArray(typeof(int));
      return result;
    }