Skip to content

Minor improvement in Gaussian Elimination in Julia #287

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

Merged

Conversation

mika314
Copy link
Contributor

@mika314 mika314 commented Jul 21, 2018

  • Remove extraneous assignment

@june128 june128 added the Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.) label Jul 21, 2018
@leios
Copy link
Member

leios commented Jul 21, 2018

I'm 50:50 on this one. It makes it ~2% harder to read (simply because you have to think about why it works for the first element at all without throwing an error in the internal for loop) and adds another unnecessary assignment for sum. Ultimately not a big deal either way.

Obviously, I don't mind changing things if you guys think it's better though!

As another note: would you mind updating the corresponding .md file with the change in line-numbers if we do merge it?

@mika314
Copy link
Contributor Author

mika314 commented Jul 21, 2018

@leios thank you for pointing to .md file. I'll do it.

@mika314 mika314 force-pushed the gaussian_elimination_julia branch from b1e31a5 to ffc0198 Compare July 21, 2018 22:51
@mika314
Copy link
Contributor Author

mika314 commented Jul 21, 2018

  • updated the corresponding .md file

@jiegillet
Copy link
Member

It's not the world most divisive question, but I think I'm with @leios in this case. Our goal is to explain algorithms, That first line is super explicit and matches the text.
Obviously in my own code it's way more obfuscated haha ^^

@mika314
Copy link
Contributor Author

mika314 commented Jul 22, 2018

I am fine if you reject the PR, especially if the PR makes the code inconsistent with the text in the book.

@jiegillet
Copy link
Member

Not inconsistent, your modification is fine, just, as leios said, 2% less readable for the purpose of writing a book.

@jiegillet jiegillet requested a review from leios July 22, 2018 01:30
leios
leios previously approved these changes Aug 3, 2018
Copy link
Member

@leios leios left a comment

Choose a reason for hiding this comment

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

I thought about it a bit. It's probably better with the change here.

@leios leios merged commit 57a5197 into algorithm-archivists:master Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation Edit This provides an edit to an algorithm implementation. (Code and maybe md files are edited.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants