Hacker News new | ask | show | jobs
by ummaycoc 2431 days ago
Do you have an explanation handle on the windowed reductions? Specifically what the number on the left means in this case (or in general)? I've tried it and it looks like `(n+1)</v` is basically `2</(n</v)` for `n>1` but I also see some things that don't exactly fit that pattern.
1 comments

The left argument is a window length. Windowed reduction groups the argument into overlapping windows with that length and does a reduction on each one of them. So if y has row length n, (n ?/ y) is the same as (?/ y) but the rank isn't reduced by one (there's an extra 1 at the end of the shape). For a numeric vector you can use ,/ as a windowed reduction to see the subvectors that are reduced over, but for a nested vector that trick doesn't quite work because it messes up the nesting.

You can email me with my first name at the company site to talk more. There's also a chat room at https://chat.stackexchange.com/rooms/52405/the-apl-orchard which is good for asking questions.