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

fill[stored]! for Symmetric and Hermitian matrices #25152

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

fredrikekre
Copy link
Member

ref. #17670 and #25030

@fredrikekre fredrikekre added the linear algebra Linear algebra label Dec 18, 2017
# fill[stored]!
function fill!(A::HermOrSym{T}, x) where T
xT = convert(T, x)
if !iszero(xT)
Copy link
Member

Choose a reason for hiding this comment

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

I imagine I miss something: A general symmetric matrix can be homogeneously populated with any value, and a general hermitian matrix with any real value?

fillband!(A.data, x, 1-size(A,1), 0)
end
return A
end
Copy link
Member

Choose a reason for hiding this comment

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

For the hermitian case the fill value must be real IIUC?

@fredrikekre fredrikekre force-pushed the fe/more-fillstored branch 2 times, most recently from 8416f3e to 447307a Compare December 18, 2017 12:34
Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

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

Thanks @fredrikekre! :)

@fredrikekre fredrikekre merged commit 3216445 into JuliaLang:master Dec 19, 2017
@fredrikekre fredrikekre deleted the fe/more-fillstored branch December 19, 2017 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants