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

symmetrize! in likelihood #17

Merged
merged 1 commit into from
Dec 4, 2019
Merged

symmetrize! in likelihood #17

merged 1 commit into from
Dec 4, 2019

Conversation

mschauer
Copy link
Owner

@mschauer mschauer commented Dec 3, 2019

As suggested by touste in #11

@@ -13,6 +13,10 @@ import GaussianDistributions: ⊕
meancov(G) = mean(G), cov(G)
meancov(G::Tuple) = G

symmetrize!(A::Symmetric) = A
symmetrize!(A) = Symmetric(A)
symmetrize!(A::Number) = A
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is there a !? It's not mutating.

Copy link
Owner Author

Choose a reason for hiding this comment

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

"M. Schauer house style:" functions marked with ! may overwrite. This gives the user the permission to define a modifying symmetrize! operation for their own matrix types which might come in handy.

@mschauer mschauer merged commit 68a15cc into master Dec 4, 2019
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