示例#1
0
 public static IEnumerable <object[]> ConcatUnorderedData(int[] counts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(counts.Cast <int>(), (left, right) => left, counts.Cast <int>()))
     {
         yield return(parms.Take(4).ToArray());
     }
 }
示例#2
0
 public static IEnumerable <object[]> JoinData(int[] leftCounts, int[] rightCounts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(leftCounts, rightCounts))
     {
         yield return(new object[] { ((Labeled <ParallelQuery <int> >)parms[0]).Order(), parms[1], parms[2], parms[3] });
     }
 }
示例#3
0
 public static IEnumerable <object[]> UnionUnorderedData(int[] counts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(counts, (l, r) => l, counts))
     {
         yield return(parms.Take(4).ToArray());
     }
 }
示例#4
0
 public static IEnumerable <object[]> JoinMultipleData(int[] counts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(counts, counts))
     {
         yield return(new object[] { ((Labeled <ParallelQuery <int> >)parms[0]).Order(), parms[1], ((Labeled <ParallelQuery <int> >)parms[2]).Order(), parms[3] });
     }
 }
示例#5
0
 // Get two ranges, with the right starting where the left ends
 public static IEnumerable <object[]> UnionUnorderedData(int[] leftCounts, int[] rightCounts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(leftCounts.Cast <int>(), (l, r) => l, rightCounts.Cast <int>()))
     {
         yield return(parms.Take(4).ToArray());
     }
 }
示例#6
0
 public static IEnumerable <object[]> ExceptUnorderedData(int[] leftCounts, int[] rightCounts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(leftCounts.Cast <int>(), (l, r) => 0 - r / 2, rightCounts.Cast <int>()))
     {
         yield return(parms.Take(4).Concat(new object[] { (int)parms[3] + (int)parms[4], Math.Max(0, (int)parms[1] - ((int)parms[3] + 1) / 2) }).ToArray());
     }
 }
 public static IEnumerable <object[]> GroupJoinMultipleData(int[] counts)
 {
     counts = counts.DefaultIfEmpty(Sources.OuterLoopCount / 64).ToArray();
     foreach (object[] parms in UnorderedSources.BinaryRanges(counts, counts))
     {
         yield return(new object[] { ((Labeled <ParallelQuery <int> >)parms[0]).Order(), parms[1], ((Labeled <ParallelQuery <int> >)parms[2]).Order(), parms[3] });
     }
 }
示例#8
0
 public static IEnumerable <object[]> IntersectUnorderedData(int[] leftCounts, int[] rightCounts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(leftCounts.Cast <int>(), (l, r) => 0 - r / 2, rightCounts.Cast <int>()))
     {
         parms[4] = Math.Min((int)parms[1], ((int)parms[3] + 1) / 2);
         yield return(parms);
     }
 }
示例#9
0
        public static IEnumerable <object[]> ConcatData(int[] counts)
        {
            foreach (object[] parms in UnorderedSources.BinaryRanges(counts.DefaultIfEmpty(Sources.OuterLoopCount), (left, right) => left, counts))
            {
                yield return(new object[] { ((Labeled <ParallelQuery <int> >)parms[0]).Order(), parms[1], ((Labeled <ParallelQuery <int> >)parms[2]).Order(), parms[3] });

                yield return(new object[] { ((Labeled <ParallelQuery <int> >)parms[0]).Order(), parms[1], parms[2], parms[3] });

                yield return(new object[] { parms[0], parms[1], ((Labeled <ParallelQuery <int> >)parms[2]).Order(), parms[3] });
            }
        }