grizzly_range

Last updated:

0 purchases

grizzly_range Image
grizzly_range Images
Add to Cart

Description:

grizzly range

Range #
Lazy and efficient 'range' iterables to generate values based on start, stop and step/count.
for (final i in 0.to(5)) {
print(i);
}
copied to clipboard
Range a length from [0, n) with step 1:
// int n = 10; // Some length n
for (final i in n.range) {
print(i);
}
copied to clipboard
// int n = 10; // Some length n
for (final i in n.take(10)) {
print(i);
}
copied to clipboard
Ranges can also be descending:
for (final i in 5.to(-5)) {
print(i);
}
copied to clipboard
Linspace #
IntRange.linspace returns an Iterable<int> with range [start, stop] with [count] elements in it.
print(1.linspace(10, 5));
copied to clipboard
Time ranges #
print(TimeRange(
DateTime(2019, 1, 1), DateTime(2019, 1, 20), Duration(days: 1)));
copied to clipboard
Month range #
print(MonthRange(DateTime(2020, 2, 29), DateTime(2032, 2, 30), 6));
copied to clipboard
ticks #
print(ticks(-100, 1000000, 10));
// => [-100000, 0, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000]
copied to clipboard
Extent #
Extent of list #
print(List.generate(11, (i) => i * 10).findExtent()); // => Extent(0, 100)
copied to clipboard
Ranging an Extent #
print(Extent(5, 50).range(5));
copied to clipboard
Generate random numbers #
print(Extent(5, 50).rands(100));
copied to clipboard
Extents #
Bin #
final extents = List.generate(11, (i) => i * 10).edgesToExtents();
final data = extents.rands(20)!;
print(extents.computeBins(data));
copied to clipboard
Counts #
final extents = List.generate(11, (i) => i * 10).edgesToExtents();
final data = extents.rands(20)!;
print(extents.computeCounts(data));
copied to clipboard
Histogram #
final extents = List.generate(11, (i) => i * 10).edgesToExtents();
final data = extents.rands(20)!;
print(extents.computeHistogram(data));
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.