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

Make Symmetric/Hermitian parametric on matrix type #7992

Merged
merged 1 commit into from
Aug 14, 2014
Merged

Conversation

andreasnoack
Copy link
Member

With this change you can something like

julia> A=randn(5,5);A=A'A;

julia> B=Symmetric(sub(A, 1:4,1:4))
4x4 Symmetric{Float64,SubArray{Float64,2,Array{Float64,2},(UnitRange{Int64},UnitRange{Int64})}}:
  7.26709   3.63019   -3.51443   -2.25044
  3.63019   4.72902   -0.361715  -2.92745
 -3.51443  -0.361715   6.09191   -2.56832
 -2.25044  -2.92745   -2.56832    5.51021

and

julia> A=sprandn(5,5, 0.5);A=A'A;

julia> B=Symmetric(A)
5x5 Symmetric{Float64,SparseMatrixCSC{Float64,Int64}}:
 0.357118  0.0       0.0          0.0         0.0      
 0.0       3.68291   0.0          1.74181     0.0      
 0.0       0.0       0.591247    -0.00102322  0.0549353
 0.0       1.74181  -0.00102322   1.98844     0.670993 
 0.0       0.0       0.0549353    0.670993    0.394334 

The request also wraps xhemv from BLAS which was missing.

andreasnoack added a commit that referenced this pull request Aug 14, 2014
Make Symmetric/Hermitian parametric on matrix type
@andreasnoack andreasnoack merged commit eb5b91c into master Aug 14, 2014
@andreasnoack andreasnoack deleted the anj/sym branch August 14, 2014 13:15
andreasnoack added a commit that referenced this pull request Aug 17, 2014
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.

1 participant