Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,4 +1,4 @@
|
|||
T[] forwardDifference(T)(in T[] data, in int level) pure nothrow
|
||||
T[] forwardDifference(T)(in T[] data, in ulong level) pure nothrow
|
||||
in {
|
||||
assert(level >= 0 && level < data.length);
|
||||
} body {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import std.stdio, std.algorithm, std.range, std.array;
|
||||
|
||||
auto forwardDifference(Range)(Range d, in int level) pure {
|
||||
auto forwardDifference(Range)(Range d, in ulong level) pure {
|
||||
foreach (immutable _; 0 .. level)
|
||||
d = d.zip(d.dropOne).map!(a => a[0] - a[1]).array;
|
||||
return d;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import std.stdio;
|
||||
|
||||
T[] forwardDifference(T)(T[] s, in int n) pure nothrow @nogc {
|
||||
T[] forwardDifference(T)(T[] s, in ulong n) pure nothrow @nogc {
|
||||
foreach (immutable i; 0 .. n)
|
||||
s[0 .. $ - i - 1] = s[1 .. $ - i] - s[0 .. $ - i - 1];
|
||||
return s[0 .. $ - n];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue