private static void TestRange(IterationData itdata) { var ienum = new IndexesEnumerator(itdata.End, itdata.Start, itdata.Reverse); RecursiveArrayEnumerator.Iterate( null, itdata.Start, itdata.End, new IndexesEnumeratorTestAction(ienum).Iterate, itdata.Reverse); }
private static IterationData ToReverse(IterationData itdata) { return new IterationData( IndexesHelper.Add(itdata.End, -1), IndexesHelper.Add(itdata.Start, -1), !itdata.Reverse); }
private static IterationData ToReverse(IterationData itdata) { return(new IterationData( IndexesHelper.Add(itdata.End, -1), IndexesHelper.Add(itdata.Start, -1), !itdata.Reverse)); }
public Measurement RunIteration(IterationData data) { double nanoseconds = measure(data).Nanoseconds; var measurement = new Measurement(1, data.IterationMode, data.Index, data.InvokeCount * OperationsPerInvoke, nanoseconds); WriteLine(measurement.ToOutputLine()); return(measurement); }
IterationData ReversedIteration(IterationData iter) { return(new IterationData { preDelay = iter.preDelay, to = -iter.to, duration = iter.duration }); }
public void TestRange( [Values(new[] { 0 }, new[] { 10258 }, new[] { 0, 0 }, new[] { 100, 1560 }, new[] { 0, 0, 0 }, new[] { 12000, 15000, 158220 }, new[] { 0, 0, 0, 0 }, new[] { 30, 300, 3000, 30000 })] int[] start, [Values(new[] { 125 }, new[] { 11169 }, new[] { 150, 17 }, new[] { 320, 1587 }, new[] { 49, 17, 9 }, new[] { 12010, 15015, 158270 }, new[] { 10, 7, 12, 18 }, new[] { 35, 317, 3002, 30018 })]int[] end) { var itdata = new IterationData(start, end); TestRange(itdata); TestRange(ToReverse(itdata)); }
public void TestRange( [Values(new[] { 0 }, new[] { 10258 }, new[] { 0, 0 }, new[] { 100, 1560 }, new[] { 0, 0, 0 }, new[] { 12000, 15000, 158220 }, new[] { 0, 0, 0, 0 }, new[] { 30, 300, 3000, 30000 })] int[] start, [Values(new[] { 125 }, new[] { 11169 }, new[] { 150, 17 }, new[] { 320, 1587 }, new[] { 49, 17, 9 }, new[] { 12010, 15015, 158270 }, new[] { 10, 7, 12, 18 }, new[] { 35, 317, 3002, 30018 })] int[] end) { var itdata = new IterationData(start, end); TestRange(itdata); TestRange(ToReverse(itdata)); }
private void FillFormData() { Random r = new Random(); IterationData data = new IterationData(); KeyValuePair <string, string> item; if (_isTest) { int skipNumber = r.Next(0, 15); if (countPassedQuestion < maxCount / 2) { item = data.CodecData.Skip(skipNumber).First(); } else { item = data.DeCodecData.Skip(skipNumber).First(); _codec = false; } } else { if (_codec) { int skipNumber = r.Next(15, data.CodecData.Count); item = data.CodecData.Skip(skipNumber).First(); } else { int skipNumber = r.Next(15, data.DeCodecData.Count); item = data.DeCodecData.Skip(skipNumber).First(); } } taskLabel.Text = item.Key; correctAnswer = item.Value; }
public Measurement RunIteration(IterationData data) { throw new NotImplementedException(); }