Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BorderArray #99

Merged
merged 7 commits into from
May 1, 2019
Merged

add BorderArray #99

merged 7 commits into from
May 1, 2019

Conversation

jw3126
Copy link
Collaborator

@jw3126 jw3126 commented Apr 24, 2019

#98

@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #99 into master will increase coverage by 0.32%.
The diff coverage is 90.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   81.12%   81.44%   +0.32%     
==========================================
  Files           8        9       +1     
  Lines        1118     1159      +41     
==========================================
+ Hits          907      944      +37     
- Misses        211      215       +4
Impacted Files Coverage Δ
src/ImageFiltering.jl 80% <ø> (ø) ⬆️
src/borderarray.jl 90.24% <90.24%> (ø)

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 3438a0c...e85d0bd. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #99 into master will increase coverage by 0.3%.
The diff coverage is 88.15%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #99     +/-   ##
=========================================
+ Coverage   81.12%   81.43%   +0.3%     
=========================================
  Files           8        9      +1     
  Lines        1118     1174     +56     
=========================================
+ Hits          907      956     +49     
- Misses        211      218      +7
Impacted Files Coverage Δ
src/ImageFiltering.jl 80% <ø> (ø) ⬆️
src/border.jl 80.76% <77.77%> (-1.87%) ⬇️
src/borderarray.jl 89.55% <89.55%> (ø)
src/mapwindow.jl 78.3% <0%> (+0.52%) ⬆️

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 3438a0c...15187a0. Read the comment docs.

@jw3126
Copy link
Collaborator Author

jw3126 commented Apr 25, 2019

@timholy what do you think about the general design of BorderArray?

  • I did not implement setindex! since it would be mutating border + inner points simultaneously
  • What should happen with padarray? Should it stay as is? Should it return a BorderArray? Should it be removed? Personally I think it could be return a BorderArray and the current padarray should be spelled something like full(padarray(...)) instead.

@timholy
Copy link
Member

timholy commented Apr 27, 2019

This looks superficially awesome, but I haven't had bandwidth recently. Maybe I can review this tomorrow, sorry for the delay.

Copy link
Member

@timholy timholy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, as usual! Only very minor points here.

The implementation of getindex via constructing the CartesianIndex is a bit unconventional, but here it makes sense. Some day we may want to allow different border types along different dimensions (see #94), in which case we'll need an index-by-index implementation, but that's not really your problem here.

src/borderarray.jl Outdated Show resolved Hide resolved
src/borderarray.jl Show resolved Hide resolved
src/border.jl Show resolved Hide resolved
@timholy
Copy link
Member

timholy commented Apr 30, 2019

Once this passes tests, I approve merging. Thanks for this, fantastic work!

@jw3126 jw3126 merged commit eb128c7 into JuliaImages:master May 1, 2019
@jw3126 jw3126 mentioned this pull request May 1, 2019
@jw3126
Copy link
Collaborator Author

jw3126 commented May 1, 2019

@timholy can we tag a new release?

@timholy
Copy link
Member

timholy commented May 4, 2019

Sorry I didn't notice the question about tagging. Absolutely! There's nothing breaking here, right? So this could be 0.6.1?

I think you should be able tag yourself, if you like. Perhaps give it a try, just so we know whether you are as empowered as you deserve to be.

@jw3126
Copy link
Collaborator Author

jw3126 commented May 4, 2019

Yeah, there is no breaking change, at least no intended one 😄. I will see if I can create a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants