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 FillMaps #113

Merged
merged 17 commits into from
Dec 10, 2020
Merged

Add FillMaps #113

merged 17 commits into from
Dec 10, 2020

Conversation

dkarrasch
Copy link
Member

@dkarrasch dkarrasch commented Oct 5, 2020

@codecov
Copy link

codecov bot commented Oct 5, 2020

Codecov Report

Merging #113 (f6cd91e) into master (77f538d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #113   +/-   ##
=======================================
  Coverage   99.78%   99.79%           
=======================================
  Files          13       14    +1     
  Lines         950      988   +38     
=======================================
+ Hits          948      986   +38     
  Misses          2        2           
Impacted Files Coverage Δ
src/LinearMaps.jl 98.80% <ø> (ø)
src/conversion.jl 100.00% <100.00%> (ø)
src/fillmap.jl 100.00% <100.00%> (ø)
src/show.jl 100.00% <100.00%> (ø)

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 77f538d...649ed54. Read the comment docs.

Comment on lines 274 to 289
LinearMap(λ::Number, M::Int, N::Int) = FillMap(λ, (M, N))
LinearMap(λ::Number, dims::Dims{2}) = FillMap(λ, dims)
Copy link
Member Author

Choose a reason for hiding this comment

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

I think the only somewhat controversial things are these constructors. They are formally unambiguous, but are they unambiguous enough for users (sufficiently distinct from UniformScalinMap constructor?)? Or should we export the FillMap construct and not include these?

Copy link
Collaborator

Choose a reason for hiding this comment

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

As this is one of few the LinearMap types that you want to construct explicitly, I guess it would make sense to export the FillMap constructor explicitly. It's somewhat asymmetric that FunctionMap is then still constructed via LinearMap. Just using LinearMap(scalar, ...) is also fine by me, no strong preference.

I do wonder what this is used for though :-) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know either what this is used for, but (a) there is an entire package (FillArrays.jl) devoted to such arrays, and (b) I do notice that our simple imlementation of matvecmul and matmatmul is even faster than theirs.

And yes, I agree that this is so specific that it is perhaps better to have an explicit constructor. It was more "sentimentality" that made me consider keeping the "one constructor for all types" status.

@dkarrasch dkarrasch force-pushed the dk/fillmap branch 3 times, most recently from 4d20666 to 12b7711 Compare October 8, 2020 13:30
@dkarrasch dkarrasch merged commit 1f45774 into master Dec 10, 2020
@dkarrasch dkarrasch deleted the dk/fillmap branch January 11, 2021 11:18
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