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

Parametrize Triangular on matrix type #7064

Merged
merged 1 commit into from
Jun 7, 2014
Merged

Parametrize Triangular on matrix type #7064

merged 1 commit into from
Jun 7, 2014

Conversation

andreasnoack
Copy link
Member

and some minor update of Triangular functionality. This should also address JuliaLang/LinearAlgebra.jl#118

cc:@dmbates, @jiahao

@andreasnoack
Copy link
Member Author

@jiahao Please have a look at this and see if it can be merged (before you refactor the linalg tests again 😡)?

@andreasnoack
Copy link
Member Author

Last call. I'll merge tomorrow if I don't hear any objections.

@dmbates
Copy link
Member

dmbates commented Jun 6, 2014

Looks good to me. I like this change and the way it can utilize multiple dispatch so effectively.

@andreasnoack
Copy link
Member Author

@jiahao @JeffBezanson I have made the proposed change to zeros(AbstractArray) and added specialised fill! methods to Triangular and Diagonal so now you can do

julia> zeros(Diagonal(randn(4)))
4x4 Diagonal{Float64}:
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0

julia> zeros(Triangular(randn(4,4), :L))
4x4 Triangular{Float64,Array{Float64,2},:L,false}:
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0

I would like to think a little more about setindex! for the special matrix types.

andreasnoack added a commit that referenced this pull request Jun 7, 2014
Parametrize Triangular on matrix type
@andreasnoack andreasnoack merged commit 547facf into master Jun 7, 2014
@andreasnoack andreasnoack deleted the anj/triangle branch June 7, 2014 20:57
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.

3 participants