Initial Commit

This commit is contained in:
2024-02-23 00:46:06 -05:00
commit 2bbedc0178
470 changed files with 46035 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Windows;
namespace Microsoft.Research.DynamicDataDisplay
{
public static class ListGenerator {
public static IEnumerable<Point> GeneratePoints(int length, Func<int, Point> generator) {
for (int i = 0; i < length; i++) {
yield return generator(i);
}
}
public static IEnumerable<Point> GeneratePoints(int length, Func<int, double> x, Func<int, double> y) {
for (int i = 0; i < length; i++) {
yield return new Point(x(i), y(i));
}
}
public static IEnumerable<T> Generate<T>(int length, Func<int, T> generator) {
for (int i = 0; i < length; i++) {
yield return generator(i);
}
}
}
}