-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
jacobi_iteration_method.py the use of vector operations, which reduces the calculation time by dozens of times #8938
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
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cc14550
Replaced loops in jacobi_iteration_method function with vector operat…
quant12345 5fa2a6e
Replaced loops in jacobi_iteration_method function with vector operat…
quant12345 8e21133
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b86d043
Delete main.py
quant12345 a735995
Update jacobi_iteration_method.py
quant12345 34b0a12
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2be3f22
Update jacobi_iteration_method.py
quant12345 cb4ea20
Update jacobi_iteration_method.py
quant12345 442d8ed
Update jacobi_iteration_method.py
quant12345 4904dea
Update jacobi_iteration_method.py
quant12345 cc545c5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d288cbd
Update jacobi_iteration_method.py
quant12345 43a39c1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5c1a12b
Update jacobi_iteration_method.py
quant12345 240f388
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The triple-quoted strings confuse the reader about what is code and what is comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use real variable names:
denom
->denominator
,no_diag
-->no_diagonals
(some readers could assumeno_diagnostics
). Is there a better variable name thantemp
? Using real names will make the code more self-documenting and will mean that fewer comments will be required to make things clear to your reader.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cclauss changed variable names. But temp is a multifaceted task, I made this name not too long, if everything is described in its name it will turn out to be a completely cumbersome name. Replaced comments with single-row ones.
Why did I use multi-line comments in the previous version: since not everything fit, and I didn’t want to comment several lines with single-line comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.