Ejemplo n.º 1
0
 public static IEnumerable <object[]> GroupJoinData(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] });
     }
 }
Ejemplo n.º 2
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());
     }
 }
Ejemplo n.º 3
0
 // Get two ranges, with the right starting where the left ends
 public static IEnumerable <object[]> UnionUnorderedData(object[] leftCounts, object[] rightCounts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(leftCounts.Cast <int>(), (l, r) => l, rightCounts.Cast <int>()))
     {
         yield return(parms.Take(4).ToArray());
     }
 }
Ejemplo n.º 4
0
 public static IEnumerable <object[]> ConcatUnorderedData(object[] counts)
 {
     foreach (object[] parms in UnorderedSources.BinaryRanges(counts.Cast <int>(), (left, right) => left, counts.Cast <int>()))
     {
         yield return(parms.Take(4).ToArray());
     }
 }
Ejemplo n.º 5
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);
     }
 }