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()); } }
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] }); } }
public static IEnumerable <object[]> UnionUnorderedData(int[] counts) { foreach (object[] parms in UnorderedSources.BinaryRanges(counts, (l, r) => l, counts)) { yield return(parms.Take(4).ToArray()); } }
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] }); } }
// 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()); } }
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] }); } }
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); } }
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] }); } }