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

Additional chol() method for compatibility #10963

Merged
merged 1 commit into from
Apr 28, 2015

Conversation

jdlangs
Copy link
Contributor

@jdlangs jdlangs commented Apr 23, 2015

#10862 changed the interface of chol to use a Val argument for dispatching. However, the documentation still specifies using a Symbol argument. This just adds an indirection method that converts the symbol to a Val, thereby keeping the old user interface and documentation intact.

@jiahao
Copy link
Member

jiahao commented Apr 23, 2015

Why not just update the documentation?

@jdlangs
Copy link
Contributor Author

jdlangs commented Apr 23, 2015

I thought it was better to keep backwards compatibility available. Is there value in requiring people to switch their code to use Val?

@jiahao
Copy link
Member

jiahao commented Apr 26, 2015

Fair enough.

I think this is good to merge unless @andreasnoack has any objections.

@andreasnoack
Copy link
Member

Yes, there is a value in requiring Val here, but the documentation should, of course, have been updated. The reason for requiring Val is that the return type of chol depends on the uplo argument (UpperTriangular or LowerTriangular). I'm not a super fan of Val{true}/Val{false}, but there is not an obviously better option. We could use chol(A, LowerTriangular), but that is a bit long.

@jdlangs
Copy link
Contributor Author

jdlangs commented Apr 27, 2015

That makes sense. I had thought it was just for dispatching but the type stability is definitely worth having.

I can perform my penance by turning this PR into a docs update.

@andreasnoack
Copy link
Member

That would be great.

@jdlangs
Copy link
Contributor Author

jdlangs commented Apr 27, 2015

Branch has been updated.

@andreasnoack
Copy link
Member

Great. Thanks.

andreasnoack added a commit that referenced this pull request Apr 28, 2015
Additional chol() method for compatibility
@andreasnoack andreasnoack merged commit b0b7e59 into JuliaLang:master Apr 28, 2015
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.

None yet

3 participants