JuliaFolds / Transducers.jl

Efficient transducers for Julia
https://juliafolds.github.io/Transducers.jl/dev/
MIT License
432 stars 24 forks source link

Clarify that default Partition is non-overlapping #414

Closed xiaodaigh closed 4 years ago

xiaodaigh commented 4 years ago

"Sliding window" -> " Sliding non-overlapping window"

I find sliding windows slightly ambiguous as it's common to have sliding windows that overlap.

codecov[bot] commented 4 years ago

Codecov Report

Merging #414 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #414   +/-   ##
=======================================
  Coverage   90.84%   90.84%           
=======================================
  Files          25       25           
  Lines        1594     1594           
=======================================
  Hits         1448     1448           
  Misses        146      146           
Flag Coverage Δ
#unittests 90.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/library.jl 93.15% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3a57454...e2d7227. Read the comment docs.

tkf commented 4 years ago

Hi, thanks for the patch. But isn't this an example of overlapping windows?

julia> 1:8 |> Partition(3; step=1) |> Map(copy) |> collect
6-element Array{Array{Int64,1},1}:
 [1, 2, 3]
 [2, 3, 4]
 [3, 4, 5]
 [4, 5, 6]
 [5, 6, 7]
 [6, 7, 8]

What do you think about adding a paragraph saying something like

As step = size by default, it produces non-overlapping windows.

?

xiaodaigh commented 4 years ago

But isn't this an example of overlapping windows?

I had totally missed that.

xiaodaigh commented 4 years ago

Updated wording to what I consider easiest to read. Please review